otuatail Posted January 10, 2008 Share Posted January 10, 2008 Can anyone help me create a connection using ASP. I have used PHP with MySQL but I have to re-create this on a windows server using ASP. Previouse cose in PHP $link = mysql_connect($host, $user, $pass) or die(mysql_error()); $database = @mysql_select_db ($data, $link); This is what I have using ASP /ADODB using a DSN <% Set connection = Server.CreateObject("ADODB.Connection") Set rsWeek = Server.CreateObject("ADODB.Recordset") Set rsMonth = Server.CreateObject("ADODB.Recordset") Set rsPrem = Server.CreateObject("ADODB.Recordset") Set rsDiv1 = Server.CreateObject("ADODB.Recordset") connection.Open dsn //*** Line 68 ***// %> I wont be using DSN either. I have looked at connectionstrings.com but still confused To clarify I need to connect to MySQL Server on Windows 2003 Server with ASP Desmond. Link to comment https://forums.phpfreaks.com/topic/85352-connection-strings/ Share on other sites More sharing options...
trq Posted January 10, 2008 Share Posted January 10, 2008 <% dim conn set conn = server.createobject("adodb.connection") conn.open "driver={MySQL ODBC 3.51 Driver};server=yourhost;Port=3306;database=yourdb;user=youruser; password=yourpass;" %> You really won't need to explicitly create all those recordset objects either. Link to comment https://forums.phpfreaks.com/topic/85352-connection-strings/#findComment-435491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.