|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP mySQL Connection
Hi all,
I am trying to connect mySQL on Localhost system through ASP. but i am getting some problem Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Here is the code: <% set myconn = server.createobject("adodb.connection") connection = "Driver={Mysql}; Server=localhost Database=test; UID=root; PWD=root" myconn.open(connection) %> I am waiting for your help guys. |
|
#2
|
|||
|
|||
|
Did you install MyODBC on the server? You can download MyODBC and view the documentation at www.mysql.com
There are example connection strings in the documentation. Look at the connection string syntax for different versions of MyODBC as well. |
|
#3
|
|||
|
|||
|
Hi,
Already i have installed MyODBC on the server. any more idea plaz thank u |
|
#4
|
|||
|
|||
|
You are missing the semi-colon between localhost and Database, and after your PWD
Try this Code:
<%
set myconn = server.createobject("adodb.connection")
connection = "Driver={Mysql}; Server=localhost; Database=test; UID=root; PWD=root;"
myconn.open(connection)
%>
You may need these added too: Code:
Port=3306; Option=0; Socket=; Stmt=; Here's an article http://www.devarticles.com/art/1/50/4 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP mySQL Connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|