bhavin12300
Active member
- Joined
- Sep 18, 2007
- Messages
- 44
- Programming Experience
- Beginner
hi
i am totally new to this vb.net application.
i its very nice to work with this techology.
now my problem
i am creating simple database application in which i want to connect to the datanbase when user click a button.
so i am crearting connection in cliclk event by creating a sqlconnection object.
but when i try to odatain this object by following code
Dim objConnection As SqlConnection = New _
SqlConnection("Server=localhost;Database=pubs;" & _
"User ID=sa;Password=vbdotnet;")
and simply build the application its give me following error.
like
so anyone tell me how to slove this error.
i had already import classes like system.data as well as system.data.sqlclient
so anyone can help me with this
please do tell me about this how to slove this thing
waiting for your reply
i am totally new to this vb.net application.
i its very nice to work with this techology.
now my problem
i am creating simple database application in which i want to connect to the datanbase when user click a button.
so i am crearting connection in cliclk event by creating a sqlconnection object.
but when i try to odatain this object by following code
Dim objConnection As SqlConnection = New _
SqlConnection("Server=localhost;Database=pubs;" & _
"User ID=sa;Password=vbdotnet;")
and simply build the application its give me following error.
like
VB.NET:
Error 1 'SqlConnection' is ambiguous in the namespace 'System.Data.SqlClient'.
so anyone tell me how to slove this error.
i had already import classes like system.data as well as system.data.sqlclient
so anyone can help me with this
please do tell me about this how to slove this thing
waiting for your reply