Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: ODBC Drivers error '80004005'


Message #1 by Sanjay Singh <SanjayS@R...> on Fri, 17 Nov 2000 19:28:09 +0530
Hello ASPers,



I am trying to connect my two database simultaneously i.e. MS- Access and

MS-SQL Server. For this I am SSI concept. For this I have defined my

database connectivity criteria. For this I am posting code for ur reference

which r as follow:





<% 

dim strDatabaseType 

strDatabaseType = "Access" 

strDatabaseType = "MSDE" 

if 

strDatabaseType = "Access" 

then 

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data

Source=d:\MSSQL7\Data\Movie2000.mdb;" ObjRS.Open "Movies", objConn 

else 

strConnect = objConn.Open "Provider=SQLOLEDB;" & "USERID=sa;Initial

Catalog=authors;" & "Initial File Name = d:\MSSQL7\Data\pubs.mdf" 

ObjRS.Open "authors", objConn 

end if %> 



Till this every thing is working. Once I try to pass value thru this it

reflect following errors:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Driver Manager] Data source name not found and no default

driver specified 

/Training_prj_Local/asp/connect2.asp, line 18



Pl find the code for the same page were I am trying to pass value. 

dim StrConnect

<% 

dim objConn, ObjRS 

set objConn = Server.CreateObject("ADODB.Connection") 

set ObjRS = Server.CreateObject("ADODB.Recordset")

 objConn.Open strConnect, "USERID=sa;" 

ObjRS.Open "Authors", 

objConn 

while not ObjRS.EOF 

Response.Write ObjRS("Title") & "

" ObjRS.MoveNext

 wend 

ObjRS.Close 

objConn.Close 

set ObjRS = Nothing 

set objConn = Nothing 

%> 



Request kindly help me.



TIA



Sanjay

###########################################################

Sanjay Singh

Rolta India Limited

Rolta Bhawan, 22nd Street, 

M.I.D.C., Marol

Andheri (E), Mumbai - 400 093



Ph:  xxx-xxx xxxx  / 826 2222  ext : 1336 / 1322 (Valsala)

Email:sanjays@r...

##################################################################




  Return to Index