errror:COMException was unhandled Invalid authorization specification

the error is in

  conn.Open("Provider=SQLNCLI10.DLL;Persist Security Info=False;Initial Catalog=backup_db;Data Source=acer\JOSEPH")

it says invalid authorization specification.do you have anyways to deal with this error? please teach me. i really need to finish my system before wednesday. this is my code so far:

Imports System.Data.SqlClient Module Module1
    Public conn As New ADODB.Connection
    Public rs As New ADODB.Recordset
    Public rs1 As New ADODB.Recordset
    Public rs2 As New ADODB.Recordset
    Public rs3 As New ADODB.Recordset
    Public rs4 As New ADODB.Recordset
    Public sql As String
    Public usrtype As String
    Public username As String
    Public sorderno As String
    Public custorederno As String
    Public Server, Database, User, Password
    Public con As New SqlConnection("Data Source=acer\JOSEPH;Initial Catalog=backup_db;Integrated Security= True")
    Public Function opendb()

        If conn.State = 1 Then conn.Close()
        conn.Open("Provider=SQLNCLI10.DLL;Persist Security Info=False;Initial Catalog=backup_db;Data Source=acer\JOSEPH")
        Return 0
    End Function

ps: im a newbie. pls be gentle of me. thank you

0 answers