dbTalk Databases Forums  

Export to MS Access

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Export to MS Access in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hugo Faber
 
Posts: n/a

Default Export to MS Access - 04-19-2004 , 03:34 PM






Hi,

This is a follow up of my earlier (18 april) described problem...

I am trying do to an export of my SQL tables to Access, by running a
VB file generated by the DTS import/export wizard.

The first time, everything works; all tables are created in Access and
filled with data, however... when I rerun my app, it just "hangs"....

What could be wrong?

I hope that someone could give some suggestions.

Thanks and best regards,

Hugo

Reply With Quote
  #2  
Old   
Mary Chipman
 
Posts: n/a

Default Re: Export to MS Access - 04-20-2004 , 09:20 AM






Place an error handler that looks like the following in your VBA code:

ExitHere:
Exit Function

HandleErr:
Select Case Err.Number

Case Else
MsgBox "Error: " & Err.Number & " " & Err.Description
End Select
Resume ExitHere
Resume

Put a breakpoint in your VB code and step through the procedure. Step
through the code until you either get an error or it just hangs. If it
hangs with no error, then open a Profiler trace to see what's going on
in SQLS. You can also look at the mdb to see what's going on with the
tables. Based on which line of code it hangs on, you should be able to
figure out what in the environment is causing the problem. If you get
an error, you can set the next statement to execute at the Resume
statement, which will take you back to the line of code that caused
the error, where you can perform the investigations outlined above.

--Mary

On 19 Apr 2004 13:34:21 -0700, hufaber (AT) tiscali (DOT) nl (Hugo Faber) wrote:

Quote:
Hi,

This is a follow up of my earlier (18 april) described problem...

I am trying do to an export of my SQL tables to Access, by running a
VB file generated by the DTS import/export wizard.

The first time, everything works; all tables are created in Access and
filled with data, however... when I rerun my app, it just "hangs"....

What could be wrong?

I hope that someone could give some suggestions.

Thanks and best regards,

Hugo


Reply With Quote
  #3  
Old   
Hugo Faber
 
Posts: n/a

Default Re: Export to MS Access - 04-20-2004 , 01:16 PM



Tanks for your reply!

However, today I have found the solution. Everywhere in my VB file I
have replaced the line

...ExecuteInMainThread = false
into
...ExecuteInMainThread = true

Now it works fine!

Hugo

Mary Chipman <mchip (AT) online (DOT) microsoft.com> wrote

Quote:
Place an error handler that looks like the following in your VBA code:

ExitHere:
Exit Function

HandleErr:
Select Case Err.Number

Case Else
MsgBox "Error: " & Err.Number & " " & Err.Description
End Select
Resume ExitHere
Resume

Put a breakpoint in your VB code and step through the procedure. Step
through the code until you either get an error or it just hangs. If it
hangs with no error, then open a Profiler trace to see what's going on
in SQLS. You can also look at the mdb to see what's going on with the
tables. Based on which line of code it hangs on, you should be able to
figure out what in the environment is causing the problem. If you get
an error, you can set the next statement to execute at the Resume
statement, which will take you back to the line of code that caused
the error, where you can perform the investigations outlined above.

--Mary

On 19 Apr 2004 13:34:21 -0700, hufaber (AT) tiscali (DOT) nl (Hugo Faber) wrote:

Hi,

This is a follow up of my earlier (18 april) described problem...

I am trying do to an export of my SQL tables to Access, by running a
VB file generated by the DTS import/export wizard.

The first time, everything works; all tables are created in Access and
filled with data, however... when I rerun my app, it just "hangs"....

What could be wrong?

I hope that someone could give some suggestions.

Thanks and best regards,

Hugo

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.