connection to Sql Server

  •  

    hi !!

    I am trying to connect to Sql Server using VB .Net,

    1 >

    Dim SqlConn As New System.Data.SqlClient.SqlConnection

            SqlConn.ConnectionString

    ="server=localhot;uid=sa;pwd=;database=Northwind" 

    SqlConn.Open()

    I am getting an error

    "Login failed for user 'sa'. Reason: Not associated

    with a trusted SQL Server connection"

    2>

    Dim

    SqlConn As New ADODB.Connection

    Dim str1 As String = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=RISDatabase;Data Source=SHITAL-20"

    SqlConn.Open(str1)

     I am getting an error

    Login failed for user 'SHITAL-20\ASPNET'

    Pl. Help me out

    Shital

  • see same post http://qa.sqlservercentral.com/forums/shwmessage.aspx?forumid=92&messageid=171994 for reply



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply