View Single Post
  #4 (permalink)  
Old July 28th, 2006, 12:23 PM
shahhussain shahhussain is offline
Authorized User
 
Join Date: Dec 2005
Location: Mingora, NWFP, Pakistan.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shahhussain Send a message via Yahoo to shahhussain
Default

Hello Mr. Jacob.
I have used the driver you have specified above for MySql Database but when i browse the
page it throws an Error as :
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/sql.asp, line 12

while i am using the MySql Database name = [testing] table name =[test] and server=[localhost]
and the code i have written is as :
Dim SomeDB
Set SomeDB = Server.CreateObject ("ADODB.Connection")
SomeDB.Open ("DRIVER=mysql; SERVER=[localhost]; UID=[shah]; PWD=[thefire]; DATABASE=[testing]")

Dim objRS
Set objRS= Server.CreateObject ("ADODB.Recordset")
objRS.Open "SELECT * FROM test", SomeDB

Do
    response.write("name = " & objRS.fields("name").value & "<br>")
    response.write("Email = " & objRS.fields("email").value)

    recTmp.MoveNext
Loop While Not objRS.EOF

objRS.Close
Set objRS= Nothing

SomeDB.Close
Set SomeDB = Nothing

Please hlep me in this thanks.


Shahhussain
Reply With Quote