Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: RE: [beginning_asp] connecting to sql database


Message #1 by Samir Patel <Samir.Patel@n...> on Wed, 13 Sep 2000 11:23:05 +0100
Hi all



I am having trouble connection to the sql database.  I am using and odbc

connection but it doesn't like the connection string.  It comes with an

error that the database driver couldn't be found but I have checked it's

there...



here is the string.....



		Application("test_ConnectionString") 

"Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data

Source=testproc;Extended Properties=""DSN=testproc;UID=sa;APP=Microsoft

Development Environment;WSID=CEX-CCS-146;DATABASE=test;Regional=Yes"";User

Id=sa;"

		Application("test_ConnectionTimeout") = 15

		Application("test_CommandTimeout") = 30

		Application("test_CursorLocation") = 3

		Application("test_RuntimeUserName") = "sa"

		Application("test_RuntimePassword") = ""



and I am opening the connection in the following way...





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

   conn.ConnectionTimeout = Application("test_ConnectionTimeout")

   conn.CommandTimeout = Application("test_CommandTimeout")

   Response.Write (application("test_connectionstring"))

   conn.Open Application("test_connectionstring"), _

			application("test_runtimeusername"), _

			application("test_runtimepassword")

			









I also have another problem.......  When I insert the dates into my SQL

database it is stored in american format.   I have looked tghrough the sql

sites but I can't change the date format.  please help





Many Thanks



Samir








  Return to Index