Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Exe fails in ADO connect to AS400 w/ 80004005

Status
Not open for further replies.

avanderlaan

Programmer
Jul 11, 2002
156
I have a VB app that is &quot;well-behaved&quot; when running in the Visual Studio IDE. It connects to the AS/400 w/0 problems. When run as a standalone executable, the &quot;Execute(<sql string>)&quot; method against the open connection returns the error 80004005 (&quot;Unspecified error&quot;) from provider=source. The VB installation is VB6(SP/5), Win2K(SP3), MDAC 2.6 and SQLServer 2000, most recent SP onboard the development machine. The EXE connects correctly to the AS/400 from a laptop with the same Windows configuration except for SQL Server. All help is gratefully appreciated.
 
Hello avanderlaan

It may be a time related program or a network related program. It will be a hard work but if you are not able to solve the problem, try to trace IP mesagges. If both computers (laptop and workstation) launch similar mesagges, it would be a network related trouble. If don't, think in network drivers or may be little differences in Operating System configuration.

Good Luck!

Polu.
 
Thank you Polu

The odd part is why the connection works when run from inside the Visual Basic IDE. Any thoughts about security issues, system accounts, or admin rights?
 
Hello again, avanderlaan

I had been wrestling with a trouble like yours two years ago. I was writing a COM for a remote SIM-card-reader and my code worked fine when I was debuggin' but didn't work in normal processing. After a few days of nigthmares, I realized that I had to wait a number of miliseconds after send a command to my device due to network delays. Try to introduce sleep's or loops in your code and see what happens.

Also, try to start your app without modifications using the same user account that you used to install Visual Basic in your workstation.

Good Luck!

Polu.
 
Polu,

I just got notiifcation of your post -- sorry for the late reply. On the morning of 16 Jan I recreated the DSN based upon a &quot;last resort&quot; suggestion fom an IT guy -- and it worked! Prior to that I had deleted the old EXE and the .pdb files, and then rebuilt. I had also verified the ADO object references as using 2.5 TLB (even though MDAC 2.7 is installed on the development machine).

The short summary is I don't know why that fixed it. Thank you for your thoughtful replies and brain time.
 
Hi,
I have exactly the same problem too.
I tried what Avanderlaan have done on Jan16 too... it works!
strange... anyway Thanks a lot for sharing the activity!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top