What is wrong with this script?

Results 1 to 2 of 2

Thread: What is wrong with this script?

  1. #1
    Join Date
    Dec 1969

    Default What is wrong with this script?

    This is the script and I always get this error when I run it:<BR>Error Type:<BR>Microsoft VBScript compilation (0x800A03FD)<BR>Expected &#039;Case&#039;<BR>/teljari.asp, line 28, column 7<BR>Select Count(*) AS number from default<BR>------^<BR><BR><BR>&#060;html&#062;<BR>&#060;body&#062;< BR>&#060;%<BR>Select Count(*) AS number from default<BR>Set Conn = Server.CreateObject("ADODB.Recordset")<BR>Conn.Ope n ("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/db/counter.mdb"))<BR>%&#062;<BR>The rows in the table default are: &#060;%= Conn("number") %&#062;<BR><BR>&#060;/body&#062;<BR>&#060;/html&#062;

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: What is wrong with this script?

    you have to assign the query to a string<BR><BR>abc = "Select Count(*) AS number from default" <BR><BR>that is one<BR><BR><BR>next you have declared con as a recordset and then are trying to use it to open a connection.<BR><BR>You will have to read up on ADO and how to use it. There are a lot of articles on the net. Look for them and read them before you try more.<BR><BR>

Posting Permissions

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