Click to See Complete Forum and Search --> : need help with asp database access


mattmac_ca
September 28th, 2002, 04:31 PM
When I try and run this page, I am getting an Internal Server Error. Can anyone see what is wrong with this code? As far as I can tell, it should work. I am using a MySQL database.

dim cnn,cmd,intOK
dim intGroupNumber
dim PDESC,PNAME

intGroupNumber= Request.QueryString.Item("action")
set cnn = Server.CreateObject("ADODB.Connection")
cnn.ConnectionString="PROVIDER = SQLOLEDB;DATASOURCE = megasqlservers.com;INITIALCATALOG=maindb1_essolutions_biz;
user id = :) ;password = :)"

cnn.Open

set cmd = server.CreateObject("ADODB.Command")

cmd.ActiveConnection=cnn
cmd.CommandType=1
cmd.CommandText="Select productDesc From smaleProducts Where productID = " & intGroupNumber

cmd.Parameters.Append cmd.CreateParameter("PDESC",adLongVarChar,adParamOutput,400)

cmd.Execute

PDESC = cmd.Parameters("PDESC")

cnn.Close

Thanks
Matthew MacPherson