I am a VB newb running VB/VS 2010.
I am trying to call a stored procedure from a SQLExpress2005 data base on a Windows 2003 Domain Controller. I keep having errors when I run my code in debug mode.
Stored procedure name = InsertUsersFromAD
Server name where SQL resides = MIS631
Database Name = AdminGUI
I have ******** rights on the dev PC and the servers
My code is as follows:
'Run Stored Procedure on SQL Database
I've tried making the Data Source = \\MIS631\SQLEXPRESS also, which didn't seem to work. Please help!!vb.net Code:
Dim CONN As New SqlConnection CONN.ConnectionString = "Data Source = \\MIS631; Initial Catalog = AdminGUI; " & "Integrated Security = True" Dim sc As New SqlCommand("InsertUsersFromAD", CONN) sc.CommandType = CommandType.StoredProcedure CONN.Open() sc.ExecuteNonQuery() sc.Connection.Close()
I am trying to finish up a school project and this is the only thing not working.
Thanks so much.




Reply With Quote