Results 1 to 3 of 3

Thread: ole db 3.5 and UPDATE statement in access 97

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    27
    i asked to MS support and they are still replying....

    so here is my problem....

    I am currently using ADO 2.0 and OLE DB 3.51 and connecting it to MS Access 97. I have an UPDATE statement in the database. Unfortunately it does not get executed when I use the ADODB.Command.Execute ...it gives me the following error "An action query cannot be used as a row source.". I checked ure online help and all other sources and have not come up against a suitable solution for my problem ...my code looks like this

    With dbaseCommand
    .CommandText = "[Create New Report]"
    .CommandType = adCmdTable
    Set dbaseParameter = .CreateParameter("REPORT_NAME", adWChar, adParamInput, 255, P1)
    .Parameters.Append dbaseParameter
    Set dbaseParameter = .CreateParameter("REPORT_DESC", adWChar, adParamInput, 255, P2)
    .Parameters.Append dbaseParameter
    Set dbaseParameter = .CreateParameter("PRODUCT_REF", adWChar, adParamInput, 255, P3)
    .Parameters.Append dbaseParameter
    End With
    dbaseCommand.Execute

    I have changed the Commandtype to whatever is available in the list and most of them say that "INVALID SQL STATEMENT.....blah blah blah" ...Can you tell me what is the problem and what I should do?


    its big i know...but its very important...

    thanks in advance..

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    what type of object is "CREATE NEW REPORT" ?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    27

    its an update statement

    Create New Report is actually an UPDATE statement in the Database Side.

Posting Permissions

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



Click Here to Expand Forum to Full Width