|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Executing scripts on MSDE
Hi all,
How do we run a script from a file if we have only MSDE installed and there are no client tools installed? What exactly I want to know is, say I'm distributing my application and am not very sure whether they have SQL Server installed or not (and for trial purposes nobody would buy a license ). So in that case I want to run the script from InstallShield to create database, tables, procedures and triggers which are written on a file. Currently I can do that with isql prompt in a command window. But with MSDE we don't have the isql tool installed. So, how do I run the script then?Thanks. |
|
#2
|
||||
|
||||
|
Just on top of my head, you can write a small executable that opens a dsn-less connection to the db and runs the script, or you can think about switching to an opensource database, like Firebird or PostgreSQL.
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#3
|
|||
|
|||
|
Thanks, but I need to connect through DSN b'cos I'm using a third party tool which essentially uses DSN. Moreover, that won't help you in creating your database. Your soln will work only if we already have a database, but I am going to create database through a script only.
|
|
#4
|
|||||
|
|||||
|
Quote:
Quote:
Quote:
|
|
#5
|
|||
|
|||
|
I think, I'm not putting my problem properly.
1. I have an installation file (made through InstallShield) wherein I open up the DOS window, and then execute the isql statement (isql /U "+username+ " /P "+ password +" /S"+ <machine where database to be installed> +" /n"+" -iscriptfile.sql" . My scriptfile.sql contains all the sql statements right from creating database to tables, procedures and user logins.2. Now, I want to be able to do the same on the MSDE. Can I do this? If yes, how and if not, why not? My other exe then connects to this database which has been so created through a DSN. So, creating a DSN is not a problem. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Executing scripts on MSDE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|