Click here to Skip to main content
15,895,483 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need help. I am very new to C# and MS SQL Server. I need to get these sequence of steps done;

1. Develop a program to connect to .csv file
2. Once connection is established transfer the data onto an SQL Server automatically.
3. Finally delete the data in the .csv file so that it is ready to get the next fresh set of data.

Any help would be highly appreciated.
Posted
Comments
Rajesh Anuhya 31-Jan-11 4:40am    
No Effort??
shakil0304003 31-Jan-11 4:43am    
what you tried? use google 1st!!!

You can see this links
Click
Click
 
Share this answer
 
This is pretty much a classic ETL[^] task

Depending on your version of SQL Server, you should look at either creating a DTS package (legacy, SQL2000) or an SSIS package

In an SSIS package, you design the steps within Visual Studio before deploying to your SQL Server - something like you've described could be achieved very easily.

Have a look into SSIS. Do you have all the tools required to use this? If so, I'd recommend using this
 
Share this answer
 
A simple program described here[^].
 
Share this answer
 
check This[^]
 
Share this answer
 
Here ..,

1. Develop a program to connect to .csv file
Here[^]
2. Once connection is established transfer the data onto an SQL Server automatically.
Here[^]
3. Finally delete the data in the .csv file so that it is ready to get the next fresh set of data.
Here[^]

Go through the Google before Posting a Question
 
Share this answer
 
you don't need to write a fully fledged program to do this. just use SQL Bulk Insert to import the data:

SQL Bulk Insert

and use a batch file to trigger the resultant sql script. you can then use the same batch file to delete the file and recreate a blank one.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900