DB Write with SQL

Unanswered Question
May 29th, 2007

Hi all,

I have problem with DB Write in CRA Editor

I can insert data in table in SQL server with this command


after run script, i see 123 is appeared in table1

But when i create variable X (interger ) with value=123 and using command


i test and see 0 row is altered. And after run script, no thing appeared in table1

Thanks first

Please reply as soon as possible.

I will vote 5 * for you.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
sferland Wed, 05/30/2007 - 05:32

I think your problem is because you're using "@" instead of "$". Here is an example from one of my script:

INSERT INTO StatMenu(SessionID,DateTime,Choice) VALUES ($lCurrentSessionID,$strCurrentDateTime,'M1000')

There are two variables (String) and one hard-coded value ('M1000').

Hope this help !


conkinkinconkinkin Wed, 05/30/2007 - 17:47

Thanks Steven,

But when i use "$" instead of "@":

INSERT INTO table1(Number) VALUES($x);

I see this error when test this SQL command by click Excute button ont tab "Test"

" Test SQL Execution

Remote Error:Java.lang.NullPointerException


Hope you can help me.

sferland Thu, 05/31/2007 - 06:46

It's probably because at the time you clicked the "Execute" button, the value of the "x" was null.

Anyway, I never use this button. Try with a real call or with reactive debugging. It should work just fine.


This Discussion