|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am trying to combine two articles from here...
the Real Time Data Gridand Using MyODBC To Access Your MySQL Database Via ASP. I have the Real Time Data Grid workingwith a SQL Server, but I can't seem to get the MySQL part working. It doesn't seem to connect to the server. I know MySQL is running and I can log in at the command prompt. I also tried both ways in the article (connection string and DSN). Although, when I try to load the testgrid.asp page, I always get this error with MySQL: Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be used to perform this operation. It is either closed or invalid in this context. /datagrid/dynamic.datagrid.asp, line 120 The line in the dynamic.datagrid.asp, in case you don't want to look it up, is: objRS.ActiveConnection = objConn Have you seen this before when you were trying to get MySQL to work? If so, could you help me out, or point me in the right direction? Thank you, gondoi P.S. Everything is on the same machine... IIS, MySQL, and SQL Server. |
|
#2
|
|||
|
|||
|
I just realized something I should have added.
This is the connection string I tried to use: strConnectionString = "Driver={MySQL}; Server=(local); Socket=; Stmt=; Database=menagerie; Uid=gondoi; Pwd={taken_out}" Thanks, gondoi |
|
#3
|
|||
|
|||
|
Gondoi,
Hi! I don't believe you need to specify the active connection. It should work okay if you model your code after this: Code:
<%
strConnection = "driver={MySQL};server=localhost;uid=YOUR_ID;pwd=YO UR_PWD;database=YOUR_DB;option=NUM"
Set adoConn = Server.CreateObject("ADODB.Connection")
adoConn.Open strConnection
strQuery = "SELECT * FROM your_table;"
Set RecordSet = adoConn.Execute(strQuery)
%>
Let me know if that works. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > ASP connection to MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|