Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 5:06 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Insert into Error
PostPosted: May 25th, 2007, 6:59 pm 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Hi,

I can not find the syntaxt error! :oops:


Code:
db.ExecuteSQL("INSERT INTO Orderregels (Artikelregel) VALUES ('"+paneelcode+"') (Orderkop) VALUES ('"+ordernummer+"')");
}


Hope that somebody can see it, to long behind the keyboard?!

Regards,

Ronnie


Top
 Profile Visit website  
 
 Post subject:
PostPosted: May 25th, 2007, 8:46 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I'm very limited in experience with scripting.
Others here may hone in on the issue immediately...

Meanwhile:
* the Help examples show an Asterisk between SELECT * FROM. Do you need one here.
* Examples also show the Execute statement within an Expression. Do you need to set a var xyz = _______ .
* Is it possible "db" is a reserved word? Try db1 instead. (doubt that's it, but)
* I assume you've got your brackets in order.

Good luck.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: May 25th, 2007, 9:01 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
TRy this:

Code:
db.ExecuteSQL("INSERT INTO Orderregels (Artikelregel,Orderkop) VALUES ('"+paneelcode+"','"+ordernummer+"')")


Top
 Profile  
 
 Post subject:
PostPosted: May 25th, 2007, 9:05 pm 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Is the final curly bracket supposed to be there?
Remove it and there is no syntax error (as far as Opus is concerned), as long as the script is on one line.

Paul


Top
 Profile  
 
 Post subject:
PostPosted: May 27th, 2007, 1:27 pm 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Thanks for the reactions: :wink:

the correct code
Code:
db.ExecuteSQL("INSERT INTO Orderregels (Artikelregel, Orderkop, recept )VALUES ('"+searchrecept+"', '"+ordernummer+"', '"+receptTXT+"')")


Regards

Ronnie


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group