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

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.

Never use ADODB (ancient oledb api). Use ADO.NET Data provider classes.

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.

have you tried connecting it through the use of SQL Enterprise Manager?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.