Oracle invalid character
-
Here, I've changed my code into this:
string query = "insert into test(no, name, dob) values(" + textBox2.Text + ", '" + textBox3.Text + "', '" + textBox4.Text + "');";
But I still got the error -ps:column
no
is int others are varcharA hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
Hmmm... have you tried executing your sql directly to check that it's working as you expect?
Reminiscing just isn't what it used to be!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
-
Hmmm... have you tried executing your sql directly to check that it's working as you expect?
Reminiscing just isn't what it used to be!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
yep, it works in sql -ps:fyi, that code works when a button is clicked. after I've changed it into showing the query it shows this
insert into test(no, name, dob) values(23, 'sawqwd', '322');
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
-
yep, it works in sql -ps:fyi, that code works when a button is clicked. after I've changed it into showing the query it shows this
insert into test(no, name, dob) values(23, 'sawqwd', '322');
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
Well, if the code works when the button is clicked, and the sql works if you copy/paste it into Oracle and run it directly, there must be an error in the calling of the querydef... Do you have the correct syntax, parameters, names etc?
Reminiscing just isn't what it used to be!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
-
Well, if the code works when the button is clicked, and the sql works if you copy/paste it into Oracle and run it directly, there must be an error in the calling of the querydef... Do you have the correct syntax, parameters, names etc?
Reminiscing just isn't what it used to be!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
Silly me, I actually only need to remove the semicolon and it works :omg:
string query = "insert into test(no, name, dob) values(" + textBox2.Text + ", '" + textBox3.Text + "', '" + textBox4.Text + "')";
Guess that would mean no semicolons when connecting from c# huh? :doh: It's so different from J2SE, :laugh: Thank for the assistance :)
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
modified on Thursday, May 26, 2011 1:50 AM
-
Silly me, I actually only need to remove the semicolon and it works :omg:
string query = "insert into test(no, name, dob) values(" + textBox2.Text + ", '" + textBox3.Text + "', '" + textBox4.Text + "')";
Guess that would mean no semicolons when connecting from c# huh? :doh: It's so different from J2SE, :laugh: Thank for the assistance :)
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
modified on Thursday, May 26, 2011 1:50 AM
Dammit... the semicolon was the first thing I was going to mention, but when I checked oracle sql syntax it was there... :sigh: Glad you got it fixed!!
Reminiscing just isn't what it used to be!! Booger Mobile - My bright green 1964 Ford Falcon - check out the blog here!! | If you feel generous - make a donation to Camp Quality!!
-
Silly me, I actually only need to remove the semicolon and it works :omg:
string query = "insert into test(no, name, dob) values(" + textBox2.Text + ", '" + textBox3.Text + "', '" + textBox4.Text + "')";
Guess that would mean no semicolons when connecting from c# huh? :doh: It's so different from J2SE, :laugh: Thank for the assistance :)
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
modified on Thursday, May 26, 2011 1:50 AM
-
Silly me, I actually only need to remove the semicolon and it works :omg:
string query = "insert into test(no, name, dob) values(" + textBox2.Text + ", '" + textBox3.Text + "', '" + textBox4.Text + "')";
Guess that would mean no semicolons when connecting from c# huh? :doh: It's so different from J2SE, :laugh: Thank for the assistance :)
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
modified on Thursday, May 26, 2011 1:50 AM
Firo Atrum Ventus wrote:
Guess that would mean no semicolons when connecting from c# huh?
Conceptually you are executing a 'statement'. That is implicit. The semi-colon is superfluous in that context. You can however construct a statement which is composed of other statements. In that case the internal statements would require a semi-colon.
-
Firo Atrum Ventus wrote:
Guess that would mean no semicolons when connecting from c# huh?
Conceptually you are executing a 'statement'. That is implicit. The semi-colon is superfluous in that context. You can however construct a statement which is composed of other statements. In that case the internal statements would require a semi-colon.
Nah, I've tried that too. It didn't work. :confused:
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
-
Nah, I've tried that too. It didn't work. :confused:
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
-
Firo Atrum Ventus wrote:
Nah, I've tried that too. It didn't work.
You would need to post what didn't work.
Everything's the same as above except this line
string query = "insert into test values(" + textBox2.Text + ", `" + textBox3.Text + "`, `" + textBox4.Text + "`);";
changed into
string query = "insert into test values(" + textBox2.Text + ", `" + textBox3.Text + "`, `" + textBox4.Text + "`);select * from test";
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind
-
Everything's the same as above except this line
string query = "insert into test values(" + textBox2.Text + ", `" + textBox3.Text + "`, `" + textBox4.Text + "`);";
changed into
string query = "insert into test values(" + textBox2.Text + ", `" + textBox3.Text + "`, `" + textBox4.Text + "`);select * from test";
A hidden needle is way more effective than an unsheathed sword. That is, in the hand of professionals. What about you? Just pray your enemies are blind