SQL problem
Hi all, I am struggling to get a MySQL database filled. The idea is to use a form that calls an irev file, that in turn adds to the database. Here is the script: ?rev put revOpenDatabase (mysql,localhost,terry_dbname,terry_dbuser,password) into tConID # Construct SQL put INSERT INTO 'terry_dbname'.'tablename' ('login' , 'ww' , 'toegang') VALUES (' $_GET[login] ', ' $_GET[ww] ', ' $_GET[toegang] '); into tSQL if tConID is a number then # Execute SQL put revDataFromQuery(tab, return, tConID, tSQL) into tList revCloseDatase tConID end if ? Sample data: http://terry.on-rev.com/h.irev?login=hafaddegonww=%3D% 5DwTjLEltoegang=xA1%0D%0AxB1 All arguments are URL encoded... But I get a SQL error... Is anyone seeing what the error could be? Terry ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: SQL problem
Hi Terry, Shouldn't that be revExecuteSQL? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering http://economy-x-talk.com http://www.salery.biz Dutch forum: http://runrev.info/rrforum New: Snapper Screen Recorder 2.0.1 Download at http://snapper.economy-x-talk.com On 4 mei 2009, at 17:19, Terry Vogelaar wrote: Hi all, I am struggling to get a MySQL database filled. The idea is to use a form that calls an irev file, that in turn adds to the database. Here is the script: ?rev put revOpenDatabase (mysql,localhost,terry_dbname,terry_dbuser,password) into tConID # Construct SQL put INSERT INTO 'terry_dbname'.'tablename' ('login' , 'ww' , 'toegang') VALUES (' $_GET[login] ', ' $_GET[ww] ', ' $_GET[toegang] '); into tSQL if tConID is a number then # Execute SQL put revDataFromQuery(tab, return, tConID, tSQL) into tList revCloseDatase tConID end if ? Sample data: http://terry.on-rev.com/h.irev?login=hafaddegonww=%3D%5DwTjLEltoegang=xA1%0D%0AxB1 All arguments are URL encoded... But I get a SQL error... Is anyone seeing what the error could be? Terry ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: SQL problem
On a stylistic point I'd like to propose my way of constructing statements to be executed. Instead of this: put INSERT INTO 'terry_dbname'.'tablename' ('login' , 'ww' , 'toegang') VALUES (' $_GET[login] ', ' $_GET[ww] ', ' $_GET[toegang] '); into tSQL I would write this: put INSERT INTO 'terry_dbname'.'tablename' ('login' , 'ww' , 'toegang') VALUES( '[[tLogin]]' , '[[tWW]]' , '[[tToeGang]]' ); into tTemplateSQL put $_GET[login] into tLogin put $_GET[ww] into tWW put $_GET[toegang] into tToeGang put merge(tTemplateSQL) into tSQL. It is more verbose but I find it far less error-prone than other constructions as my mind gets very confused by a profusion of double quotes, single quotes, ampersands, etc. Just my tuppenceworth. Bernard On Mon, May 4, 2009 at 4:19 PM, Terry Vogelaar tvogel...@de-mare.nl wrote: Hi all, I am struggling to get a MySQL database filled. The idea is to use a form that calls an irev file, that in turn adds to the database. Here is the script: ?rev put revOpenDatabase(mysql,localhost,terry_dbname,terry_dbuser,password) into tConID # Construct SQL put INSERT INTO 'terry_dbname'.'tablename' ('login' , 'ww' , 'toegang') VALUES (' $_GET[login] ', ' $_GET[ww] ', ' $_GET[toegang] '); into tSQL ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: ODBC MS SQL Problem with 2.9
Hi Matthias, Check out this bugzilla: http://quality.runrev.com/qacenter/show_bug.cgi?id=5967 Please vote for it or add extra comments. Thanks Robert Eppich I am having a problem with a stack, which runs under 2.81 without problem, but not under 2.9. I connect to a MS SQL Server via ODBC. My select-expression normally retunrs about 20 lines. With 2.9 i only get one (incomplete) line. I added forward only to the revopendatabase command, as this is ,according to the dictionary, compatible with 2.8.1. I also tried the 2 other cursor types, also without success. My revopendatabase command looks like this: get revopendatabase(ODBC,odbc_name,,db_user,db_user_pass, forward only) Has anyone an idea what could be wrong here? Regards, Matthias Rebbe ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re-2: ODBC MS SQL Problem with 2.9
Hi Robert, thanks for letting me know. I ran into a similar problem with 2.9beta in January. I reported that and got a reply from Runrev with new db externals. I tested with that externals at that time without problems. Therefore i saw no need to do further tests. Now this takes revenge on me I voted for that bug and i am hoping they will fix that asap. In the meantime i will use 2.8.1 for odbc things. Regards, Matthias Rebbe Original Message Subject: Re: ODBC MS SQL Problem with 2.9 (06-Apr-2008 16:46) From:Robert Eppich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi Matthias, Check out this bugzilla: http://quality.runrev.com/qacenter/show_bug.cgi?id=5967 Please vote for it or add extra comments. Thanks Robert Eppich I am having a problem with a stack, which runs under 2.81 without problem, but not under 2.9. I connect to a MS SQL Server via ODBC. My select-expression normally retunrs about 20 lines. With 2.9 i only get one (incomplete) line. I added forward only to the revopendatabase command, as this is ,according to the dictionary, compatible with 2.8.1. I also tried the 2 other cursor types, also without success. My revopendatabase command looks like this: get revopendatabase(ODBC,odbc_name,,db_user,db_user_pass, forward only) Has anyone an idea what could be wrong here? Regards, Matthias Rebbe ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution To: use-revolution@lists.runrev.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
ODBC MS SQL Problem with 2.9
I am having a problem with a stack, which runs under 2.81 without problem, but not under 2.9. I connect to a MS SQL Server via ODBC. My select-expression normally retunrs about 20 lines. With 2.9 i only get one (incomplete) line. I added forward only to the revopendatabase command, as this is ,according to the dictionary, compatible with 2.8.1. I also tried the 2 other cursor types, also without success. My revopendatabase command looks like this: get revopendatabase(ODBC,odbc_name,,db_user,db_user_pass, forward only) Has anyone an idea what could be wrong here? Regards, Matthias Rebbe ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution