Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
am using this code to connect to mysql and want to use it for mssql
how is it done

VB
Public Class DatabaseConnection

    Private con As New OdbcConnection
Posted
Updated 5-Mar-18 3:34am
Comments
Richard C Bishop 12-Apr-13 16:24pm    
You can't. You have to use SQLConnection.

1 solution

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2[^]

VB
Using connection As New SqlConnection(connectionString)
    connection.Open()
    ' Do work here; connection closed on following line.
End Using
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900