Back to the month index |
Back to the list index
|
bonsai@net5.co.jp
Tue, 10 Sep 1996 12:18:30 +0900 (JST)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Jens-Peter Haack: "Re: [mSQL] Large Databases and O(n)"
- Previous message: Darryl Collins: "Re: [mSQL] mSQL/Java Query Exception"
- In reply to: bonsai@net5.co.jp: "Re: [mSQL] mSQL/Java Query Exception"
- Next in thread: Mary Gan: "Re: [mSQL] mSQL/Java Query Exception"
Date: Tue, 10 Sep 1996 12:18:30 +0900 (JST) From: bonsai@net5.co.jp Message-Id: <199609100318.MAA16668@sun1.net5.co.jp> Subject: Re: [mSQL] mSQL/Java Query ExceptionThanks to everyone who answered my query. I was suprised to recieve around 10
replies that all suggested the same, incorrect solution.
Solution, enclose the data contained in each variable in single quotes :
nameval = "'"+name.getText()+"'";
emailval = "'"+email.getText()+"'";
Then build a query string as such :
msql.Query("insert into cdiusers (name, email)
values ("+nameval+","+emailval+")");
Which when unraveled gives the string :
insert into cdiusers (name, email) values ('whatever name was entered','whatever
email address was entered')
It seems like we all knew what had to be done, but weren't to sure on how to do it.
Byron (a.k.a Bonsai)
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Jens-Peter Haack: "Re: [mSQL] Large Databases and O(n)"
- Previous message: Darryl Collins: "Re: [mSQL] mSQL/Java Query Exception"
- In reply to: bonsai@net5.co.jp: "Re: [mSQL] mSQL/Java Query Exception"
- Next in thread: Mary Gan: "Re: [mSQL] mSQL/Java Query Exception"