rzamith
Member
- Joined
- May 22, 2006
- Messages
- 5
- Programming Experience
- 3-5
Im trying to manipulate my SQL Server database inside VB.net.. never done it, and im having some troubles!
The only example I have is this one:
im trying to use this on a "saving" SP, using the textbox4.text and transfer it to a database field.. not working. Need some help, never used this way of connection between sql and vb.net, but also dont like the dataset option..
Thanks!
The only example I have is this one:
VB.NET:
Dim ds_sp As DataSet
Dim conexao As SqlClient.SqlConnection
Dim da_sp As SqlClient.SqlDataAdapter
conexao = New SqlClient.SqlConnection("server=(local); ... )
da_sp = New SqlClient.SqlDataAdapter("SP_Name", conexao)
da_sp.SelectCommand.CommandType = CommandType.StoredProcedure
da_sp.SelectCommand.Parameters.Add(New SqlClient.SqlParameter("@code", SqlDbType.SmallInt))
da_sp.SelectCommand.Parameters("@codigo").Value = TextBox4.Text
ds_sp = New DataSet
da_sp.Fill(ds_sp, "SP_Name")
da_sp.Dispose()
conexao.Close()
im trying to use this on a "saving" SP, using the textbox4.text and transfer it to a database field.. not working. Need some help, never used this way of connection between sql and vb.net, but also dont like the dataset option..
Thanks!
Last edited by a moderator: