473,387 Members | 1,572 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,387 software developers and data experts.

What is this error about? Hope I'm posting at the right place..

Tim
Hi, I'm kinda new to Dot Net in general and I'm trying to see if I can
get some Connection stuff in a mesage box.. Well, I tried this code and
I get an error that says " Type SQL Connection is not Defined" .. I have
the System.Data reference in solution explorer, but I'm not sure what
references I need? Maybe that isn't the problem, and if not, can someone
tell me what it is?

Thanks in advance
Tim

Code: ----------------------------------------------------------------------

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myConnection As New SqlConnection
myConnection.ConnectionString = "Persist Security
Info=False;Integrated
Security=SSPI;database=levelheadedbobdb;server=sql 11.mySQLserver.com;Connect
Timeout=30"
myConnection.Open()
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _
+ ControlChars.Cr + "State: " + myConnection.State.ToString())
myConnection.Close()
End Sub
---------------------------------------------------------------------------------------

Nov 20 '05 #1
1 891
"Tim" <Do*******@netscape.net> schrieb
Hi, I'm kinda new to Dot Net in general and I'm trying to see if I
can get some Connection stuff in a mesage box.. Well, I tried this
code and I get an error that says " Type SQL Connection is not
Defined" .. I have the System.Data reference in solution explorer,
but I'm not sure what references I need? Maybe that isn't the
problem, and if not, can someone tell me what it is?

Thanks in advance
Tim

Code:
----------------------------------------------------------------------

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myConnection As New SqlConnection


Menu Edit -> Find&Replace -> Find symbol: "SQLConnection". Double-click the
found symbol to jump to the object browser.
You'll see the full qualified name is System.Data.SqlClient.SqlConnection.
Either use this name, or, probably better, Import the System.Data.SqlClient
namespace by putting a

Imports System.Data.SqlClient

at the top of the file, or add it to the Imports list in the project
properties.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

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

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
29
by: tmp123 | last post by:
I hope any of my post helps someone, specially to people who is learning C. Thanks to people who has teach me things I didn't know before. And to all... all... and all others, too much posts...
8
by: werner | last post by:
Hi! I don't want to use eval() in order to parse a user-supplied formula. What alternatives do I have? PHP has no standard functionality for tokenizing or parsing expressions in this regard. ...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
34
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What online resources are available? ----------------------------------------------------------------------- *...
12
by: Stephan Beal | last post by:
Hello, all! i'm working on a program where i'm making heavy use of (...) arguments and i have a question about them. It's all working fine and well, but i'm getting a warning from one compiler...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.