Hi friends,
I got vb.net 2008 express and sql server 2005 and 2008 express editions whic I downloaded from microsoft website.Now I just want to connect vb.net with sql server 20o5 or 2008.I am using a connection string as

PubConnstring = "Data Source=RAMAN\SQLEXPRESS;Database=FirmTest11;Trusted_Connection=Yes"

'Create your connection object
        Dim objconnection As ADODB.Connection

        Dim strSQL As String

        'Create an instance
        objconnection = New ADODB.Connection        
        Try
            objconnection.Open(strConnString)
            objconnection.Execute(strSQL)
            objconnection.Close()
            objconnection = Nothing
        Catch
            Err.Raise(Err.Number, , Err.Description)
        End Try

    End Function

Getting Error : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.

Please tell me the solution.... i need it ASAP

Edited 6 Years Ago by __avd: Added [code] tags. Please read [b]Member Rules[/b]

use the .sdf file for this. if the .sdf file is used, you can use the same sqlconnection as when connecting to sql server but for the .mdf file, you would require knowledge of the sqlce Connection.

Hi Friends

Can u please give me a little example of connection string with ado.net.
Please its very important....I hope u find a solution for me soon.

This article has been dead for over six months. Start a new discussion instead.