on ‎2007 Apr 02 8:15 AM
Hi, EveryOne,
I tried to insert(update) a string data type using Fixed SQL Query as, for a example:
insert into Masters(MasterName) values([Param.1])
In html form I enter a value in field and press button to call the function. But if enter in the field a String value - nothing inserted in table but if I enter Number - everything works fine. I tried to use commas but the effect is the same.
Thnks,
Serj
Request clarification before answering.
Sergey,
You have to wrap String and Date param values in single quotes. Try this:
insert into Masters(MasterName)
values('[Param.1]')
Also, be sure you are using a "Command" Model SQL Query. A Fixed SQL Query will error when doing Inserts, Updates, and Deletes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sergey,
Ryan's sql statement is right. The ' sign is used to mark the [Param.1] as a string.
The sql statement (connection) is language independent, but you have to make sure that you mark up strings and timestamps in the correct way.
In your first statement
Masters(MasterName) values([Param.1])
xMII will replace [Param.1] with the value you type in("yourvalue"). For strings("yourvalue") it will look like this
Masters(MasterName) values(yourvalue)
this should bring back a sql error. You can try it in another sql client.
Hope this help as an explanation.
Regards,
Martin
Using Ryan's suggestion, test the query in the template editor. If it works, then please supply the javascript you are using to set and run the query. If it does not work, please supply the database version and run a select statement against the table, change the content type to text/xml, and paste the column definitions of the xml in the thread.
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Sergey.
Almost certainly this has to do with UTF-8/encoding issues. There is an important combination of database settings, HTML page settings, and so on that affect this.
Also, it is important to be on the latest patch level of xMII (version 11.5 SR3), as I know there were some fixes in this area.
Best regards,
Rick
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.