|
-
Jun 22nd, 2000, 04:38 AM
#1
Thread Starter
Member
SQL problems with Win95
I'm developing an ActiveX application to be run in a browser. When it loads, the app. connects to an SQL Server. The code works when the application is viewed in IE5.0 under Win98/NT, however, when I try to connect in Win95, I get error 80004005 (DSN not found or specified driver does not exist). Here is my code:
----------------------------------
Option Explicit
Private cntn As ADODB.Connection
Private Const DB_uid = "LDT_User"
Private Const DB_pwd = "LDT_User"
Private Const DB_driver = "SQL Server"
Public Function create(dbname As String, server As String) As Boolean
On Error GoTo Errhandler
Set cntn = New ADODB.Connection
cntn.ConnectionString = "uid=" & DB_uid & ";pwd=" & DB_pwd & ";server=" & server & ";driver=" & DB_driver & ";database=" & dbname
cntn.ConnectionTimeout = 30
cntn.open
cntn.BeginTrans
create = True
Exit Function
Errhandler:
create = False
End Function
-----------------------------------
Any idea what is going wrong?
Thanks in advance for your response,
Nahid Harjee
*NOTE: I realized that Win95 doesn't provide the SQL Server drivers, so I installed MDAC 2.1. Now the error message is no longer DSN not found...., it is: SQL Server not found.
[Edited by harjeen on 06-22-2000 at 06:19 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|