|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help getting data from SQL with VB 2005SQL database. What I want to do is get the information during From_Load. I have found how to setup the connection to the database but I have no idea how to get information from it. Here is my code so far: Dim sqlConn As New SqlClient.SqlConnection("server=testDBServer;uid=XXX;pwd=XXX;database=DB1;") sqlConn.Open() Select * From VA_Data sqlConn.Close() I get a line under the Select part of the code. Can anyone tell me what im doing wrong here? Any and all help will be greatly appreciated! Thanks, Arlan Arlan,
Have a look at these pages, I copied the link to a frame, therefore to see all, you should only get the first part of the link. http://samples.gotdotnet.com/quickstart/winforms/doc/DataAccessPlaceHolder.aspx I hope this helps, Cor Show quoteHide quote "Arlan" <arla***@hotmail.com> schreef in bericht news:1151417486.998837.326510@u72g2000cwu.googlegroups.com... > Im a little new to VB 2005 and have been trying to get some data from a > SQL database. What I want to do is get the information during > From_Load. I have found how to setup the connection to the database > but I have no idea how to get information from it. Here is my code so > far: > > > Dim sqlConn As New > SqlClient.SqlConnection("server=testDBServer;uid=XXX;pwd=XXX;database=DB1;") > sqlConn.Open() > Select * From VA_Data > sqlConn.Close() > > I get a line under the Select part of the code. Can anyone tell me > what im doing wrong here? > Any and all help will be greatly appreciated! > > Thanks, > Arlan >
Distributed Programming
Rewriting the Textbox Obscure error CHM file with .NET Registering hot-keys for your Winform DatagridView comboboxcolumn - assign cell value Adding new row to table in DataGridView Newbie Needs Help ! Code working in one sub routine, but not another Find out the MAC-Adress of a server |
|||||||||||||||||||||||