473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help getting data from SQL with VB 2005

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=X XX;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

Jun 27 '06 #1
1 1013
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/quickst...aceHolder.aspx

I hope this helps,

Cor

"Arlan" <ar*****@hotmail.com> schreef in bericht
news:11**********************@u72g2000cwu.googlegr oups.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=X XX;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

Jun 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
8
by: MattP | last post by:
Ok, with the help of some examples found on the web and some minor modifications on our own, we have a simple and working encrypt and decrypt solution. It runs as a service, watches for files with...
1
by: Chris | last post by:
Hi, I am trying to use the data access dll in one of my projects and was originally getting the error: 'Microsoft.Practices.EnterpriseLibrary.Data' does not have a strong name. I then...
28
by: Siv | last post by:
Hi, If I run the following: strSQL = "Select * FROM Clients;" da = New OleDb.OleDbDataAdapter(strSQL, Conn) 'Create data adapter cb = New OleDb.OleDbCommandBuilder(da) ...
7
by: Richard | last post by:
I have a form with seven tapages. These span only one record with a large number of fields (textboxes). On Tabpage1 I display a number of read-only text boxes. This displays information about...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
10
by: Jonathan Wood | last post by:
I'm taking my first stab at using ASP.NET memberships and could use some help. I'm following along in a book, which recommends I use the Web Application Administration Tool in VS 2005. A...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.