Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics 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 August 17th, 2003, 06:32 PM
Authorized User
 
Join Date: Jun 2003
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 If this works am gonna be very happy.. and u deserve a drink from me at your favourite bar. I will definately let you know how i go in 12 hrs time..
 Thanks alot for your help..

LION OF JUDDAH!
 
Old August 19th, 2003, 01:13 AM
Authorized User
 
Join Date: Jun 2003
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Am now getting pissed of everytime i try installing the MDAC 2.7 SP1 it installs well but when i try using the programme it still doesn't work properly. Am now sure that MDAC is the problem because i changed the program to load up first without making the Database connection en all the controls are now working fine.

  Is there any other solution i can try.

LION OF JUDDAH!
 
Old August 19th, 2003, 01:58 PM
Authorized User
 
Join Date: Jun 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm all out of idea.

You might try installing the MDAC 2.8 (http://www.microsoft.com/downloads/d...DisplayLang=en) but I doubt it will work

PS: Did you install MDAC with the admin privileges?

Stéphane Lajoie
 
Old August 20th, 2003, 07:22 PM
Authorized User
 
Join Date: Jun 2003
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey buddy!!..I tried installing the MDAC again en this time i got a different error.. It's about connection to the server.

Run-time error '-2147217843 (80040e4d)
[Microsoft][ODBC SQL Server Driver][SQL Server][Login failed for user '[null]'. Reason:
not associated with a trusted SQL Server Connection.


the client is using Windows NT Authentication

and am using connection command like the one below in VB6.

NOTE: This connection has been working in my computer even after specifying the correct database and the server it still gives me problems.

objConn.Open "Driver=SQL Server;Server=" & SQLServer & ";" & "Database=" & SQLDB & ";"

if u can help please!! holla

LION OF JUDDAH!
 
Old September 9th, 2003, 02:54 AM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Jaeger Send a message via AIM to Jaeger Send a message via MSN to Jaeger Send a message via Yahoo to Jaeger
Default

Well your connection string isn't specifying a Username/Password combo, nor is it specifying to use trusted connection.

Here's a cheat on how to get a good ADODB connection string:
1. Create a file called <something>.UDL
2. Double click on the file.
3. You'll get a dialog that will allow you do specify the driver and connection settings for a database, PLUS it will allow you to test those connection settings.
4. Save the file and open it up in Notepad, it will contain a complete connection string for the connection. This ensures that you have a valid connection string for the authentication type you want.


A couple of things to keep in mind since you are developing for both WinNT and Win98:
1. NT and 98 handle authentication differently, NT will try to pass the credentials of the Logged on user whenever sent a challenge( ie Trusted Connection). If the client or the Server is a member of a domain, and the other is not, then a trusted connection has to be set up manually (by using Net Use \\<Server> /U:<Domain>\UserName) and the connection has to be made from the Client to the Server.
2. Since you are not specifying an Authentication type in your connection string, Windows 98 will default to a Null-Pipes session connection to the SQL server, while NT will try to establish a trusted connection (and if the SQL server can't resolve the security account, it puts [NULL] in the name of the user account when returning an authentication error)

If you need authenticated access to the SQL server, and you need to use 98 and NT, then I would recommend using SQL Authentication instead of Windows Authentication for the DB access... The down side is that you have to Create SQL accounts for each User that needs access. Alternatively, you can specify the "UseTrustedConnection=true" (spelling?) option if there is a domain structure that all the computers log into, but you still need to give individual Users or groups rights to the database.

 
Old September 10th, 2003, 10:45 PM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

With the error he is getting he will not be able to do that trick.

This error was caused by the an update downloaded from www.windowsupdate.com
It was either:
Security Update for Microsoft Data Access Components (823718)
OR:
Q282010: Recommended Update for Microsoft Jet 4.0 Service Pack 7 (SP7) - Windows XP

I know because I am having the same problem. Now my Outlook gives me
this error: "The procedure entry point GETIUMS could not be located in the dynamic link library MSDART.DLL" when it loads.

AND

SQL Server 2000 gives me this error:
"Unknown Error 8007007F" when I try to Return All Rows from Enterprise Manager.

Do you have any other help?




Quote:
quote:Originally posted by Jaeger
 Well your connection string isn't specifying a Username/Password combo, nor is it specifying to use trusted connection.

Here's a cheat on how to get a good ADODB connection string:
1. Create a file called <something>.UDL
2. Double click on the file.
3. You'll get a dialog that will allow you do specify the driver and connection settings for a database, PLUS it will allow you to test those connection settings.
4. Save the file and open it up in Notepad, it will contain a complete connection string for the connection. This ensures that you have a valid connection string for the authentication type you want.


A couple of things to keep in mind since you are developing for both WinNT and Win98:
1. NT and 98 handle authentication differently, NT will try to pass the credentials of the Logged on user whenever sent a challenge( ie Trusted Connection). If the client or the Server is a member of a domain, and the other is not, then a trusted connection has to be set up manually (by using Net Use \\<Server> /U:<Domain>\UserName) and the connection has to be made from the Client to the Server.
2. Since you are not specifying an Authentication type in your connection string, Windows 98 will default to a Null-Pipes session connection to the SQL server, while NT will try to establish a trusted connection (and if the SQL server can't resolve the security account, it puts [NULL] in the name of the user account when returning an authentication error)

If you need authenticated access to the SQL server, and you need to use 98 and NT, then I would recommend using SQL Authentication instead of Windows Authentication for the DB access... The down side is that you have to Create SQL accounts for each User that needs access. Alternatively, you can specify the "UseTrustedConnection=true" (spelling?) option if there is a domain structure that all the computers log into, but you still need to give individual Users or groups rights to the database.

 
Old November 10th, 2003, 08:29 AM
Registered User
 
Join Date: Nov 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Gdawg
 With the error he is getting he will not be able to do that trick.

This error was caused by the an update downloaded from www.windowsupdate.com
It was either:
Security Update for Microsoft Data Access Components (823718)
OR:
Q282010: Recommended Update for Microsoft Jet 4.0 Service Pack 7 (SP7) - Windows XP

I know because I am having the same problem. Now my Outlook gives me
this error: "The procedure entry point GETIUMS could not be located in the dynamic link library MSDART.DLL" when it loads.

AND

SQL Server 2000 gives me this error:
"Unknown Error 8007007F" when I try to Return All Rows from Enterprise Manager.

Do you have any other help?
I've had the same Outlook error and SQL Enterprise error. Installing the latest MDAC (2.8) solved the problem.

http://www.microsoft.com/data

Best regards,
Gregory Liénard

@iPower
Toekomstlaan 16i
B-2900 Schoten

Web: http://www.ipower.be

_______________________________________________
      MORE VISITORS WITH A PERMANENT
     TOPPOSITION AT THE SEARCH ENGINES

         http://www.Hit-Magnet.com
_______________________________________________





Similar Threads
Thread Thread Starter Forum Replies Last Post
How CTI/IVR app can be developed in C# .net 2003? shakeel C# 1 October 8th, 2007 10:11 PM
Problems installing IIS 5 on XP-M.C.E. 2002 urbanwebdev Internet Information Services 2 December 22nd, 2006 07:03 PM
Installing IIS on Windows XP Professional gorman General .NET 4 May 11th, 2005 05:29 AM
Installing PHP on Win XP how to ? tandhy BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 April 6th, 2004 12:51 PM
Error in Excel macro after going from NT to XP Kendenny Excel VBA 7 April 1st, 2004 11:41 AM





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