Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with a connection string
Message
De
29/09/2008 18:30:40
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Problems with a connection string
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01351672
Message ID:
01351672
Vues:
56
Hi, I'm new at this and i'm having problems with a connection string, this is my code:
    Sub Page_Load(ByVal obj As Object, ByVal e As EventArgs)
        If IsPostBack() Then
            Dim objConn As New OleDbConnection("Provider=SQLOLEDB; Data Source=db2fx981\comware;Initial Catalog=SIP;User Id=sa;Password=;")
            objConn.Open()
            REM "Provider=SQLOLEDB; Server=db2fx981\comware;Database=SIP;Trusted_Connection=True;Uid='Edgar Salcedo';Pwd=4116734-1")
            Dim sSQL, Resul As String
            sSQL = "Insert into tClientes (Descripcion) values ('" & Descripcion.Text & "')"
            Dim objCmd As New OleDbCommand(sSQL, objConn)
            
            Resul = objCmd.ExecuteNonQuery
            If Resul Then
                Response.Write("Se ha agregado correctamente el registro")
            End If
        End If
    End Sub
</script>
The problem shows up when goes to ObjConn displaying an error:
Login failed for 'sa'. The user is not associated with a trusted SQL Server Connection.
How can I solve this?

Best regards.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform