Ask a Question related to ASP Database, Design and Development.
-
Wayne... #1
conection string for a MySQL database
I'm trying to get asp to conect to a MySQL database, I've tried copying a
few examples online that I found [there doesn't seem to be many!!] and I
always get a 500 error with the code below. what am i doing wrong?
any examples of a working connection string anyone could show me would be
fantastic. thanks i advance.
Wayne...
<%@ LANGUAGE="VBSCRIPT" %>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open = "DSN=main;Uid=wayne;Pwd=******;"
SQL_query = "SELECT * FROM content;"
Set RS = MyConn.Execute(SQL_query)
%>
<HTML>
<HEAD>
<TITLE>test</TITLE>
</HEAD>
<BASEFONT FACE="arial">
<BODY>
<p><b><% Response.Write SQL_query %></b></p>
<%while not RS.eof%>
<%=RS("")%> <%=RS("title")%> <%=RS("date ")%> <%=RS("content")
%><br>
<%RS.MoveNext%>
<%wend%>
<%
RS.Close
MyConn.Close
%>
===========
the other version I tried:
===========
<%@ LANGUAGE="VBSCRIPT" %>
<%
strConnection =
"driver={MySQL};server=IP_NUMBER_GOES_HERE;uid=way ne;pwd=******;database=mai
n;option=NUM"
Set adoDataConn = Server.CreateObject("ADODB.Connection")
adoDataConn.Open strConnection
strQuery = "SELECT * FROM content;"
Set RS = adoDataConn.Execute(strQuery)
%>
==================
HEEELLLPPPP!!!!!!!!!!!!!!!!!!!!!!!!!!
Wayne... Guest
-
Coldfusion distributed IIS conection
Hello, I need some help to understand what goes into the ISAPI conection from a IIS server and a ColdFusion one. The IIS machine: Windows 2003 and... -
MySQL Database not retrieving the full database
Hi, I am using MySQL and PHP for my repository. It has 500+ records. till now it was displayiing all records in the database, but since from one... -
convert string to safe string before adding to database
Hi I am updating a site for a client who is running CF5. The update and insert queries break when the user uses inverted commas ". I currently... -
LAN no conection
I am trying to conect two pcs through the nic adaperts in WIN XP, can I run a cable directly to each adapter? -
slow conection
I got this "internet booster" form a website. I used to get speeds of 1.8 mbps, aftre I installed I'm getting speeds of 600 kbps. I uninstalled the... -
Jeff Cochran #2
Re: conection string for a MySQL database
On Mon, 17 May 2004 00:17:48 +0100, "Wayne..."
<wayne@secretwebdesign.com> wrote:
Not posting the full error. See:>always get a 500 error with the code below. what am i doing wrong?
Why do I get a 500 Internal Server error for all ASP errors?
[url]http://www.aspfaq.com/show.asp?id=2109[/url]
Also:
[url]http://www.able-consulting.com/ADO_Conn.htm[/url]
Jeff
Jeff Cochran Guest



Reply With Quote

