| | |
How can I generate sql script with data in sql server 2000?
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
•
•
Please any one help me...
I want to insert data automatically to the table while installing an application. how can i do this? Can I generate sql script for this???
Regards
Jineesh
It depends on how big is the data you are dealing with. For example few lines can be inserted handy written script.
Few hundred lines can be inserted from script-generated sql script like:
C# Syntax (Toggle Plain Text)
declare @crlf varchar(2) set @crlf = char(13)+char(10) select 'insert into tab1 (a,b,c) values (''' +a+''','''+b+''','''+c''');'+crlf; from tab1 where /* add filter here*/
for 1000+ you can store data into Excel table and import it very simple way (see http://horizon.leadhoster.com/?content=tipstricks topic Fast and simple import data from Excel table into SQL server ) or XML and process data on the server within stored procedure or with XQuery http://blogs.msdn.com/mrorke/ see Dynamic XQuery Expressions.
Finally for 100000+ I would reccommend you distribute whole database file (mdf+ldf) and during installation just unpack it and attach (works perfectly!).
![]() |
Similar Threads
- sql server 2000 and mysql (MySQL)
- generate sql script (ASP.NET)
- How to Retrieve THAI Language Data From SQL Server 2000 to string variable (Visual Basic 4 / 5 / 6)
- Execute an SQL Script in JDBC (Java)
- how to connect SQL server 2000 to vb.net? (VB.NET)
- How do I Backup the MS SQL server 2000 database file (mdf) to my local PC ? (MS SQL)
- vb.net and SQL Server 2000 (VB.NET)
- MS Access v/s MS SQL Server 2000 (MySQL)
Other Threads in the C# Forum
- Previous Thread: Automatically detect RSS feed available in a website...
- Next Thread: real-time value of "value"
| Thread Tools | Search this Thread |
.net access algorithm angle array barchart bitmap box broadcast c# capturing check checkbox client combobox control conversion convert csharp custom database datagrid datagridview dataset datetime dbconnection degrees delegate design development disappear draganddrop drawing encryption enum event excel file firefox form format forms function gdi+ httpwebrequest image index input install java label leak libraries list listbox mandelbrot math monodevelop mouseclick msword mysql operator path pause photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox round server sleep socket sql statistics stream string table tcpclientchannel text textbox thread time timer update usercontrol validation virtualization visualbasic visualstudio webbrowser windows winforms wpf xml





