Page 1 of 1

Error Message when Update a field

PostPosted: Thu Jul 19, 2007 7:28 am
by carlos torres
When i try to update an specific field of a table a get a warning message that says "Command text does not return a result set".

I test both ways as SQL string and as single statement... in both cases i got the same message.

Code: Select all
.../// case 1 w/ string
InputBox "Mark?" "Write a value (0-5)" "[xMark]"
SetVar "[strSQL]" "UPDATE Student SET Mark5=[xMark]"
dbpExecSQL "DbLst" "[strSQL]" "Student"

.../// case 2 directly single statement
dbpExecSQL "DbLst" "UPDATE Student SET Mark5=3.0" "Student"

What happen?
What I'm doing wrong?

I will appreciate your help, Regards


PostPosted: Thu Jul 19, 2007 10:25 am
by Neosoft Support
For SQL commands that do not return results such as "UPDATE", you must leave the last parameter of dbpExecSQL empty. For example:

dbpExecSQL "DbLst" "[strSQL]" ""

PostPosted: Thu Jul 19, 2007 5:34 pm
by carlos torres
Hi NeoSoft

I was thinking that the third parameter of the statement, was the table where the recordset is returned.

dbpExecSQL "DbLst" "[strSQL]" ""

The help file says it is optional.... I leave it empty and it works