-
August 28th, 2006, 06:11 PM
#1
Senior Member
ASP and MySQL connectivity
Hi guys,
I am in a great trouble.
I am trying to establish a connection between MySQL and ASP file.
I have a webserver having database in MySQL
I have an asp file in which following code is written:
<%@ Language=VBScript
set con=Server.CreateObject("ADODB.Connection")
con.Open ("DRIVER={MySQL ODBC 3.51 Driver}; Server=localhost;Database=DB_admin;uid=UserN;pwd=password;")
Session.Timeout=1000
set rs=Server.CreateObject("ADODB.Recordset")
uid=trim(Request.Form("uid"))
pwd=trim(Request.Form("pwd"))
session("id")=""
if trim(uid)<>"" and trim(pwd)<>"" then
rs.Open "select * from login where id='" & trim(uid) & "' and password='" & trim(pwd) & "'",con
if not rs.EOF then
......
......
%>
But I am unable to establish the connection.
Please help.
Thanks.
Now is the moment, or NEVER!!!
-
September 1st, 2006, 01:02 AM
#2
Senior Member
I forget to mention that I am running this code on Linux server.
Now is the moment, or NEVER!!!
-
September 1st, 2006, 02:15 PM
#3
Are you using mod_mono? If so, a quick search on their site turned up Connector/Net (I don't do much .NET stuff, but have used Connecter/J for Java stuff). The Mono-Project MySQL page is pretty informative. What kinds of errors are you getting, and what server version?
enmand
-
September 2nd, 2006, 01:57 AM
#4
Senior Member
I m including the connection string in ther code itself.
I am not sure if VBScript is going to work on Linux or not.
The code is not in .NET but in plain asp. All other pages are in HTML.
Both the links are pointing at .NET pages.
Now is the moment, or NEVER!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|