accessing database

Results 1 to 2 of 2

Thread: accessing database

  1. #1
    asplearner Guest

    Default accessing database

    I found a great asp tutorial at and strongly recommend it to all. I am using a server to test my asp pages but I am having trouble accessing my database.<BR>this is the file, what can i change to access the database. I am able to retreive files from the right directory but I get errors when I try to write to the database.<BR><BR>thanks,<BR>&#060;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&#062;<BR>&#060;%@ Language = VBscript %&#062;<BR>&#060;%<BR><BR>&#039Declare variables.<BR>Dim carID<BR>Dim tranID<BR>Dim SQLCARNAME<BR>Dim conncarname<BR>Dim carname<BR><BR><BR>&#039Grab variables from the querystring.<BR>carID=Request.Querystring("carID") <BR>tranID=Request.Querystring("tranID")<BR><BR>&# 039Get the name of the car we&#039re intrested using the <BR>&#039Primary key for the query.<BR><BR>SQLCARNAME="SELECT carName FROM Cars "<BR>SQLCARNAME=SQLCARNAME & "WHERE carID= " & carID<BR><BR>set conncarname = server.createobject("ADODB.Connection")<BR>conncar "parking"<BR>set carname=conncarname.execute(SQLCARNAME)<BR>%&#062; <BR>

  2. #2
    Karl Guest

    Default RE: ...

    What type of error and what code are you using to update? It could be a variety of things such as you don&#039t have permission to update, or you have a bad sql query string.<BR><BR><BR>--<BR>Karl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts