PDA

View Full Version : flash to asp to mysql



magjac
May 7th, 2007, 01:22 PM
Hi I am trying to use this script to add data to my MYSQL Database but keep getting errors, anyone see whats wrong?



<%
option explicit

response.buffer = true

response.expires = -1000

response.expiresabsolute = #1980-01-01 12:00#

response.addheader "cache-control", "private"

response.addheader "pragma", "no-cache"



Dim objMail, msg

Dim sqlserver, conn, uid, pwd, database, sql, rs

sqlserver = "mydbb3.foretag.surftown.se"

uid = "xxxx"

pwd = "xxxx"

database = "norskhy_flaggan"

Set conn = Server.CreateObject("ADODB.Connection")

conn.ConnectionString = "network=dbmssocn;server=" & sqlserver & ";driver={SQL Server};uid=" & uid & ";pwd=" & pwd & ";database=" & database

conn.Open

'adduser.asp?namn=namn&adress=adress&ort=ort&telefon=telefon&email=email&tid=tid

%>

Digitalosophy
May 7th, 2007, 01:26 PM
So you can't connect to mySQL? What error as you getting?

magjac
May 7th, 2007, 01:59 PM
So you can't connect to mySQL? What error as you getting?

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
/hissaflaggan/adduser.asp, line 25

Someone told me that this script is for MSSQL, is there an easy way to make it work for MYSQL?

Digitalosophy
May 7th, 2007, 02:45 PM
Try looking at this:
http://www.webcheatsheet.com/asp/mysql_connection_strings.php