Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie question: VB.NET, SQL, database 1

Status
Not open for further replies.

magnus2

Programmer
Mar 8, 2004
23
SE
Hi! I want to write data to a database using SQL frases from Visual Basic .Net code. How do I do it? Kind regards /Magnus
 
try byuing a book and looking up this
this is just one of many examples
remember this is pseudocode and won't really work

Code:
dim sqlcon as new sqlconnection
dim sqladp as new sqldatatadapter
dim sqlcom as new sqlcommand
dim sqlcbu as new sqlcommandbuilder
dim dt as new datatable

sqlcon.connectionstring = "..."
sqlcon.open
sqlcom.connection = sqlcon
sqlcom.commandtext = "SQLselect"
sqladp.selectcommand = sqlcom
sqladp.fill(dt)

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top