connection from c# to sql server 2005

  • Thread starter Thread starter roshan
  • Start date Start date
R

roshan

hi all,
I am new to this group and also new to c#.I am trying to learn c# right
now.
I am doing a small asssignment in which i have to create a small
file with .sql extension in windows.then write a code in c# to access
that file and then connect to sql server 2005 and execute the query
present in that .sql file.
please help me to finish this assignment.
thank you.
 
And what's the question?


To create file and write text into it use File.Create/StreamWrite.Write
methods (see msnd)
To connect the SQLServer and execute the script use SQLConnection,
SQLCommand classes

roshan said:
hi all,
I am new to this group and also new to c#.I am trying to learn c# right
now.
I am doing a small asssignment in which i have to create a small
file with .sql extension in windows.then write a code in c# to access
that file and then connect to sql server 2005 and execute the query
present in that .sql file.
please help me to finish this assignment.
thank you.

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Hi,

If you want to learn then you have to figure it out, if we tell you how todo
this (or give you the code) you will learn nothing

Do you have a book of C#? I had Professional C# programming and it was very
good. You could also look into the MS Press books, they are good.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top