G
Grey Alien
I have created a SQL Server Express db in my ASP.Net website. I have a
file that contains several SQL statements to create tables (100+) and
stored procedures. I am guessing that there has to be a way of creating
the database tables and stored procedures from the file with SQL
statements (other than typing the statements manually - which would take
hours - and is also error prone). However, I ahve not been able to find
any information that shows how I can use the SQL statements in my file
to generate the tables and stored procedures in my db. Does anyone know
how to do this?. Ideally, I will have the .sql file in the WebSite
project so that whenever I change the schema or a stored procedure, I
can automatically rebuild the db (i.e. update the db) to reflect the new
changes.
So what I need to know is the ff:
1). How can I use my SQL statements file to create tables and stored
procs in my newly created db?
2). How can I keep the db synchronised with any changes in the *.sql
file (i.e. if I change a stored procedure etc, how can I "update the db
with the change?)
file that contains several SQL statements to create tables (100+) and
stored procedures. I am guessing that there has to be a way of creating
the database tables and stored procedures from the file with SQL
statements (other than typing the statements manually - which would take
hours - and is also error prone). However, I ahve not been able to find
any information that shows how I can use the SQL statements in my file
to generate the tables and stored procedures in my db. Does anyone know
how to do this?. Ideally, I will have the .sql file in the WebSite
project so that whenever I change the schema or a stored procedure, I
can automatically rebuild the db (i.e. update the db) to reflect the new
changes.
So what I need to know is the ff:
1). How can I use my SQL statements file to create tables and stored
procs in my newly created db?
2). How can I keep the db synchronised with any changes in the *.sql
file (i.e. if I change a stored procedure etc, how can I "update the db
with the change?)