This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: sql script + command insert !
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
08:48 AM
sql script + command insert !
Hi,
I have a basic msi project who must to connect to a databse and insert some value !
in the sql script node, i can add a newsqlconnection and that's work my database is well create when i install the product !
Now i have create a script file (sqlscript.sql )with this code, it's just a test 🙂 :
But when i run my project the database is well create and the table too but the installer fails with this message :
error 27506 error executing sql script sqlscript.sql, line 20 tje ,name bla bla is not permitted in this context. Only constants expressions or variable allowed here. Column name are not permitted
I've try to place a "go" after my insert but anything change !
Someone can tell me how i can insert some value in the sql script.sql WITHOUT another file !
thanks for all
Christophe
I have a basic msi project who must to connect to a databse and insert some value !
in the sql script node, i can add a newsqlconnection and that's work my database is well create when i install the product !
Now i have create a script file (sqlscript.sql )with this code, it's just a test 🙂 :
create table MyDB
(
id int not null,
nom varchar(40) not null
)
insert into MyDB(id, nom) values (1,"bla bla");
But when i run my project the database is well create and the table too but the installer fails with this message :
error 27506 error executing sql script sqlscript.sql, line 20 tje ,name bla bla is not permitted in this context. Only constants expressions or variable allowed here. Column name are not permitted
I've try to place a "go" after my insert but anything change !
Someone can tell me how i can insert some value in the sql script.sql WITHOUT another file !
thanks for all
Christophe
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 12, 2007
12:25 PM
Are you able to run the same script successfully outside InstallShield such as Microsoft SQL Server Management Studio?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 13, 2007
03:23 AM
Hi hidenori,
To begin thanks for your time, that's works fine now, connect to db, insert db..
It was a mistake in the line SQL 😞
sorry sorry !
If you have sometimes is it possible you read this topic and tell me if my solution is correct and if i understand the problem !
http://community.installshield.com/showthread.php?t=174923
I'm a beginner in installshield and i would like TO UNDERSTAND how works the installation for to made correct package of course 🙂
Thanks for all really
Christophe
To begin thanks for your time, that's works fine now, connect to db, insert db..
It was a mistake in the line SQL 😞
sorry sorry !
insert into MyDB(id, nom) values (1,'bla bla');
If you have sometimes is it possible you read this topic and tell me if my solution is correct and if i understand the problem !
http://community.installshield.com/showthread.php?t=174923
I'm a beginner in installshield and i would like TO UNDERSTAND how works the installation for to made correct package of course 🙂
Thanks for all really
Christophe