Alpha Video Training
Results 1 to 2 of 2

Thread: SQL and Arguments

  1. #1
    Member njguy's Avatar
    Real Name
    Tom Ritter
    Join Date
    Nov 2009
    Location
    New Jersey
    Posts
    289

    Default SQL and Arguments

    What is the correct way to decalre arguments with SQL.....the code below keeps giving me errors that no arguments have been declared for the SQL Query. The sql line that is commented out works correctly....wanted to make sure the rest of the code worked without the arguments.



    e.SQLCommandWasHandled = .t.
    sql = "INSERT INTO Ratings (IdeaSeq, UserId)VALUES (:NEW_Ideaeq1, :New_USERID)"
    ' sql = "INSERT INTO Ratings (IdeaSeq, UserId)VALUES (1,1)" -- For testing this line works
    dim flag as l
    dim args as sql::arguments
    args.xml = e.argsxml
    e.cn.PortableSQLEnabled = .t.
    flag = e.cn.execute(sql)
    if flag = .t. then
    e.flagError = .f.
    e.errorText = ""
    e.rowsAffected = e.cn.affectedRows()
    e.SQLToDisplay = sql
    e.ArgsToDisplay = ""
    else
    e.flagError = .t.
    e.errorText = e.cn.callresult.text
    e.rowsAffected = 0
    end if

  2. #2
    Member
    Real Name
    Sparticuz
    Join Date
    Jun 2009
    Location
    Clearwater, FL
    Posts
    512

Similar Threads

  1. Concatenating arguments in an SQL filter
    By RaEd. in forum Application Server Version 10 - Web/Browser Applications
    Replies: 5
    Last Post: 01-10-2012, 11:42 AM
  2. SQL arguments without the dialog box
    By ehanson in forum Alpha Five Version 10 - Desktop Applications
    Replies: 3
    Last Post: 09-15-2011, 09:18 PM
  3. What to do with multiple SQL arguments
    By gagsoft in forum Alpha Five Version 9 - Desktop Applications
    Replies: 11
    Last Post: 08-31-2009, 12:46 PM
  4. Need a push in the right direction with SQL queries and arguments
    By Ciaran in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 06-16-2009, 04:58 PM
  5. SQL Arguments as variables
    By hpjchobbes in forum QReportBuilder
    Replies: 4
    Last Post: 04-09-2008, 11:30 PM

Bookmarks

Posting Permissions

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