G
Guest
I am using the following code and it works when I have aspnet as a bona fide
user in the sql server database. Why doesn't the use of trusted connection
allow me as logged in user and dbo of database to access dbase. If I do not
have aspnet on the sql side I get login failed machinename/aspnet??
Dim myConnString As String =
"SERVER=fcstestbox;Trusted_Connection=yes;DATABASE=sex_offender_group;"
Dim myconnection As New System.Data.SqlClient.SqlConnection(myConnString)
Dim sqlstr As String = "insert into tblname
(fname,lname,clientID,dob,agetype) values('" & TextBox1.Text &
"','akin',1,'2/24/51','a')"
Dim objsqlcommand As New System.Data.SqlClient.SqlCommand(sqlstr,
myconnection)
myconnection.Open()
objsqlcommand.ExecuteNonQuery()
myconnection.Close()
user in the sql server database. Why doesn't the use of trusted connection
allow me as logged in user and dbo of database to access dbase. If I do not
have aspnet on the sql side I get login failed machinename/aspnet??
Dim myConnString As String =
"SERVER=fcstestbox;Trusted_Connection=yes;DATABASE=sex_offender_group;"
Dim myconnection As New System.Data.SqlClient.SqlConnection(myConnString)
Dim sqlstr As String = "insert into tblname
(fname,lname,clientID,dob,agetype) values('" & TextBox1.Text &
"','akin',1,'2/24/51','a')"
Dim objsqlcommand As New System.Data.SqlClient.SqlCommand(sqlstr,
myconnection)
myconnection.Open()
objsqlcommand.ExecuteNonQuery()
myconnection.Close()