Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2005, 01:10 PM
Registered User
 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Further Info regarding Run Time Error 3146

I believe I have found the code where I am getting this run time error which I paste below:

Dim objdatabase As Connection 'ODBC

Set objdatabase = wrkODBC.OpenConnection("Connection1", , , "ODBC;UID=" & SQL_ID & ";PWD=" & SQL_PASS & ";DSN=" & SQL_DSN)

From what I have seen in the VB help file, the construct of the second code line is this:

Set connection = workspace.OpenConnection (name, options, readonly, connect)

Could someone please suggest what part of this line of code is likely to be affected if you upgrade your Operating System? From what I can tell the function "Connect" has been described in this code and refers to some external database(s). (Just thinking out loud) perhaps the code is refering to databases which are no longer in existence or perhaps have been renamed. Does the "Connect" function somehow refer to the location of external database(s) because there is no obvious pathname specified in the code. Any thoughts guys would be much appreciated!



 
Old March 30th, 2005, 01:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

did you ODBC connection work fine???

you have no path reference b/c you are using ODBC to connect...



HTH

Gonzalo
 
Old March 30th, 2005, 01:55 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I suspect that the DSN you are supplying in SQL_DSN became lost with the upgrade.
 
Old March 30th, 2005, 04:37 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you reinstall VB after the upgrade?
Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
run-time error(s) Chacko C++ Programming 0 March 4th, 2007 02:28 PM
Runtime Error type 3146 Bruce Sexton Beginning VB 6 0 March 30th, 2005 09:33 AM
run time error ashishroyk Java GUI 0 October 8th, 2004 01:42 AM
RUN-TIME ERROR compcad Beginning VB 6 2 May 21st, 2004 02:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.