Problems With ADO Commands

Results 1 to 2 of 2

Thread: Problems With ADO Commands

  1. #1
    Phil HARDY Guest

    Default Problems With ADO Commands

    I have two problems both relating to the use of ADO commands in ASP pages, one when using MS ACCESS as the back end database and a different one when using SQL Server 7.0. Probably I am missing something obvious but I just can’t see what, so any help would be gratefully received.<BR><BR>In both cases I have a valid connection (tested by using “Response.write ConnectionName.state”) I then move on to the command where the code, simplifying for space, looks like this:<BR><BR>set cmdTest = server.CreateObject("adodb.command") <BR>With cmdTest <BR> .ActiveConnection = cn ‘valid connection already tested <BR> .CommandText = "upInsertData" <BR> .CommandType = adCmdStoredProc <BR> .Parameters.Append .CreateParameter("name", adVarChar, adParamInput, 50, "George") <BR> .Parameters.Append .CreateParameter("animal", adVarChar, adParamInput, 50, "okapi") <BR> .Execute <BR>End With<BR><BR>Running this with an MS Access database at the backend where “upInsertData” is a valid, stored update query which expects two text parameters I get the error:<BR><BR>ADODB.Command error &#039 800a0bb9&#039 <BR>The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. <BR>/adotest_Local/Command.asp, line 22 <BR><BR>Can anyone tell me what is wrong?<BR><BR>Running the same code against a SQL Server database (where the stored procedure has been tested using Query Analyser) produces nothing at all, no error messages, no insert into the table, absolutely nothing. Investigation by using a response.write tends to indicate that the code bombs out right after the <BR>.commandtype assignment.<BR><BR>I should add that the code works perfectly form a Visual Basic application and is as far as I can make out identical in form to the examples given in the Wrox book , “Professional Active Server Pages 3” and the database server has the ADO2.1 .dll file properly registered.<BR><BR>Any advice would be gratefully received.<BR><BR>Cheers<BR><BR>Phil Hardy<BR>

  2. #2
    Phil HARDY Guest

    Default Forget I Asked

    Forget I asked a more sensible search of the archive has given me the answer - include the file!<BR><BR>Cheers<BR><BR>Phil H

Posting Permissions

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