ASP with MYSQL

J

Jawad

Sometimes you dread the day you woke up and said that you will become
a Computer Engineer. Not that you love being one, but its just one of
those days for me.

I have extensively worked on ASP, Access And Sql Server, on win 2k.
Now the requirements have changed. The DB has to be MySql. Right now,
I m working with a Win2k server and running ASP on IIS. That will
eventually be run on Linux on Chilli ASP. I dread that day too now.

The thing is, I have got The connection between ASP and MySql running
after much difficulty, because I suck at DSN connections and all. Now,
that its running, I can't seem to get the RecordCount for any
recordset I open with MySql. I worked around it to avoid it, but now I
m stuck with the Paging problem, cause whenever I try to page a
recordset, the following error pops up :-

Error Type:
ADODB.Recordset (0x800A0CB3)
Object or provider is not capable of performing requested operation.
/WorldMediaServices/admin/ListCategory.asp, line 102

AND THE REVELANT CODE FOR THE PAGE is :-


<%
set Res = Server.CreateObject("adodb.recordset")

SQL = "select * from A_Categories"

if not request("Category") = "0" then
SQL = SQL & " where name = '" & request("Category") & "'"
end if

SQL = SQL & " order by name"

Res.open SQL,Application("Conn"),3,2
Res.PageSize = 10
Res.absolutepage = 1
%>


Line 102 being the last one.

I don't know where the problem lies, the configuration of MySql for
Windows or ASP.

Any help would be really appreciated.
Thanks
Regards
Jawad
 
J

Jeff Cochran

I have extensively worked on ASP, Access And Sql Server, on win 2k.
Now the requirements have changed. The DB has to be MySql. Right now,
I m working with a Win2k server and running ASP on IIS. That will
eventually be run on Linux on Chilli ASP. I dread that day too now.

You may want to bone up on the differences/limitations of Chilisoft's
ASP product. You may find yourself in trouble trying to use code
developed on IIS/Windows.
The thing is, I have got The connection between ASP and MySql running
after much difficulty, because I suck at DSN connections and all.

See:

http://www.able-consulting.com/ADO_Conn.htm

The OLEDB connection is rather simple.
Error Type:
ADODB.Recordset (0x800A0CB3)
Object or provider is not capable of performing requested operation.
/WorldMediaServices/admin/ListCategory.asp, line 102

AND THE REVELANT CODE FOR THE PAGE is :-


<%
set Res = Server.CreateObject("adodb.recordset")

SQL = "select * from A_Categories"

if not request("Category") = "0" then
SQL = SQL & " where name = '" & request("Category") & "'"
end if

SQL = SQL & " order by name"

Res.open SQL,Application("Conn"),3,2
Res.PageSize = 10
Res.absolutepage = 1
%>


Line 102 being the last one.

I don't know where the problem lies, the configuration of MySql for
Windows or ASP.

More likely the code you use works in SQL Server but there's a
difference in MySQL. Try a simple query to make sure the connection
and recordset works, then step through the rest. ASPFAQ.com has some
info, or try a MySQL support list.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top