cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ChristopheOce
Level 7

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 🙂 :


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
Labels (1)
0 Kudos
(2) Replies
hidenori
Level 17

Are you able to run the same script successfully outside InstallShield such as Microsoft SQL Server Management Studio?
0 Kudos
ChristopheOce
Level 7

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 !

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
0 Kudos