Wrox Programmer Forums
|
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 April 30th, 2008, 04:38 PM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default vb6 .exe login issues

Hello all,
This is my first vb6 application...
I'm using Microsoft SQL server 2000 as my back end and vb6 as my front end. My application complies without any problems and i am connecting to my database. However, when i create an executable and try logging in, i'm getting the following error: Error No. -2147467259, [DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.

Has anyone every had this error before?
Any suggesstions would be appreciated.

Thanks
 
Old April 30th, 2008, 08:19 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 this happens when you try to connect on a different pc, not the one that you use to build and test this app.?

probably, the string connection you are using is bad for that pc.

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 2nd, 2008, 07:41 AM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Gonzalo,
Thank you for replying. I get the error message even on my machine, which is the one used to create the executable.

I'm really at a loss with this issue.
 
Old May 2nd, 2008, 07:44 AM
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

Well, you said that you can connect to the database, but from where???

Are you sure that you connection string is ok??

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 2nd, 2008, 01:50 PM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Afternoon Gonzalo,
I can connect from my machine to the server (if's that's what you mean); when i step through my program and hover over the connection string, i can see the connection info. Also, there are forms that update various tables in my database, these function fine. If i make an entry and check the table afterwards, the data is there. So, in my mind the application is connecting to the server. Am i correct?
 
Old May 2nd, 2008, 02:18 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

ok, sounds fine, but do you change the connection string when you change the pc?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 2nd, 2008, 03:53 PM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Afternoon again,
No the connection string is not changed on another PC.
 
Old May 2nd, 2008, 05:29 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

Well, I'm almost sure that you have to change the connection string to make it work.

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old May 7th, 2008, 08:10 AM
Authorized User
 
Join Date: Apr 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default


Hi Gonzalo,
I got the problem fixed:). After stepping through the program again, we realized that the program was not picking up the .ini (config file) which stores the database name and server name. Added to that, the Executable and the Config file had different names. I think VB has issues with this. Therefore, we just created a new project and pulled all the forms into it, giving the config file and the project the same name and the executable worked:D, that solved all the problems.
Thankyou for your guidance nonetheless.

Jade





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16 Login/Logout Issues tenjinspen BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 June 12th, 2008 04:11 AM
VB6 -> FoxPro 9 Data Type Issues VladamirJP VB Databases Basics 1 July 19th, 2006 04:55 PM
vb6.exe application error myth12345 VB How-To 1 December 27th, 2004 10:23 AM
How to integrate vb6.exe into Explorer Shell schurli VB How-To 0 April 3rd, 2004 03:52 PM





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