CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 2286|Reply: 6

SQL Error...Tlg jap

[Copy link]
Post time 30-11-2006 05:38 PM | Show all posts |Read mode
Aku tgh develope satu sistem guna ASP.Net...igt dah ok dah. Tetiba jer ada error keluar.

System.Data.OleDb.OleDbException: Syntax error (missing operator) in query expression ''D'nanal' WHERE


Aku perasan pasal tanda '....so any idea camana aku nak settlekan benda nih??? Dateline dah nak dekat..huhuhu

Terima kasih in advance..

[ Last edited by  aks_berhad at 30-11-2006 05:40 PM ]
Reply

Use magic Report


ADVERTISEMENT


Post time 1-12-2006 12:26 PM | Show all posts

Reply #1 aks_berhad's post

Refer This.... Harap Membantu...
http://support.microsoft.com/kb/825738
Reply

Use magic Report

Post time 1-12-2006 02:11 PM | Show all posts
bagi code asp.net tu
tp based on your error u kena buat workaround untuk apostrophe symbol tu (something like parsing the SQL string to take care of special characters etc)

tak ingat dah, rasanya ada command untuk benda tuh...
Reply

Use magic Report

 Author| Post time 4-1-2007 12:55 PM | Show all posts
Sori, baru teringat pasal nih. Ari tuh dah dpt diernye error pasal tanda koma kat atas tuh. Then saya tukar tanda ' dgn ".
Baru ok...so ada tak cara lain selain saya kena tukar tanda tuh???

Terima kasih pasal mambantu...
Reply

Use magic Report

Post time 20-1-2007 06:11 PM | Show all posts
Originally posted by aks_berhad at 4-1-2007 12:55 PM
Sori, baru teringat pasal nih. Ari tuh dah dpt diernye error pasal tanda koma kat atas tuh. Then saya tukar tanda ' dgn ".
Baru ok...so ada tak cara lain selain saya kena tukar tanda tuh??? ...


simbol quote tu datang dari mana? Adakah dari user input ? Kalau dari user input,aku syorkan kau pakai parameterized query instead daripada build sql string sendiri.
Reply

Use magic Report

 Author| Post time 21-1-2007 03:36 PM | Show all posts
Originally posted by ultra78 at 20-1-2007 06:11 PM


simbol quote tu datang dari mana? Adakah dari user input ? Kalau dari user input,aku syorkan kau pakai parameterized query instead daripada build sql string sendiri.



Sori..boleh terangkan apa benda tuh??
Reply

Use magic Report

Follow Us
Post time 20-3-2007 03:48 PM | Show all posts
Just replace the apostrophe ...

string aa;
aa.replace("'","''");
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

29-12-2024 01:12 PM GMT+8 , Processed in 2.226489 second(s), 21 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list