Click here to Skip to main content
15,907,326 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Strange web-service behavior with a c# client Pin
Amju13-Jul-05 2:54
Amju13-Jul-05 2:54 
GeneralRe: Strange web-service behavior with a c# client Pin
malharone13-Jul-05 5:46
malharone13-Jul-05 5:46 
GeneralOutlook PST Data Report Pin
Anonymous12-Jul-05 11:28
Anonymous12-Jul-05 11:28 
GeneralSendInput API Method Pin
DigitalBay12-Jul-05 10:23
DigitalBay12-Jul-05 10:23 
GeneralRe: SendInput API Method Pin
progload12-Jul-05 13:06
progload12-Jul-05 13:06 
Generalactivex selft rejistrationvb Pin
_tasleem12-Jul-05 8:39
_tasleem12-Jul-05 8:39 
GeneralUpdating/Writing to SQL Server Pin
spettiford12-Jul-05 8:17
spettiford12-Jul-05 8:17 
GeneralRe: Updating/Writing to SQL Server Pin
ToddHileHoffer12-Jul-05 10:01
ToddHileHoffer12-Jul-05 10:01 
My advice is to write one stored procedure that updates all the appropriate tables. Once you have your stored procedure written call it like this. Also put imports data.sqlclient at the top of your page. This is an example from the project I'm working on, obviously you need to use your own names / variables.


Private Function UpdateLiabilityRecord(ByVal intClassID As Integer)

Dim Conn As New SqlConnection
Conn.ConnectionString = Session("ConnectionString")

Dim Cmd As New SqlCommand
Cmd.Connection = Conn
Cmd.CommandType = CommandType.StoredProcedure
Cmd.CommandText = "dbo.USP_AM_UpdateLiabilityClass"

Dim PrmClassID As New SqlParameter("@ClassID", SqlDbType.Int)
PrmClassID.Direction = ParameterDirection.Input
Cmd.Parameters.Add(PrmClassID)
PrmClassID.Value = intClassID

Dim PrmClassCode As New SqlParameter("@ClassCode", SqlDbType.Char, 6)
PrmClassCode.Direction = ParameterDirection.Input
Cmd.Parameters.Add(PrmClassCode)
PrmClassCode.Value = Right("000000" & Trim(Me.txtClassCode.Text), 6)

Dim PrmEffectiveDate As New SqlParameter("@EffectiveDate", SqlDbType.DateTime)
PrmEffectiveDate.Direction = ParameterDirection.Input
Cmd.Parameters.Add(PrmEffectiveDate)
PrmEffectiveDate.Value = CDate(Me.txtEffDate.Text)



Conn.Open()
Cmd.ExecuteNonQuery()
Conn.Close()
End Function

Of course, don't forget to validate your data first.





"People who never make mistakes, never do anything."

My blog
http://toddsnotsoamazinglife.blogspot.com/
GeneralData List Pin
erikkl200012-Jul-05 7:56
erikkl200012-Jul-05 7:56 
GeneralRe: Data List Pin
ToddHileHoffer12-Jul-05 10:03
ToddHileHoffer12-Jul-05 10:03 
GeneralRe: Data List Pin
erikkl200012-Jul-05 12:21
erikkl200012-Jul-05 12:21 
GeneralCheckboxes Pin
Victoria3412-Jul-05 7:00
Victoria3412-Jul-05 7:00 
GeneralRe: Checkboxes Pin
Anonymous12-Jul-05 9:56
Anonymous12-Jul-05 9:56 
QuestionHow can load the data in CrystalReport Pin
Jeeva Jose12-Jul-05 5:15
Jeeva Jose12-Jul-05 5:15 
AnswerRe: How can load the data in CrystalReport Pin
ToddHileHoffer12-Jul-05 6:50
ToddHileHoffer12-Jul-05 6:50 
GeneralHELP!!! SQL Pin
Member 202519312-Jul-05 3:58
Member 202519312-Jul-05 3:58 
GeneralRe: HELP!!! SQL Pin
d.olsson12-Jul-05 4:12
d.olsson12-Jul-05 4:12 
GeneralRe: HELP!!! SQL Pin
toxcct12-Jul-05 6:17
toxcct12-Jul-05 6:17 
GeneralRe: HELP!!! SQL Pin
toxcct12-Jul-05 6:19
toxcct12-Jul-05 6:19 
GeneralRe: HELP!!! SQL Pin
Ray Guan12-Jul-05 20:15
Ray Guan12-Jul-05 20:15 
GeneralHELP!!!!! working with data grids Pin
Member 202519312-Jul-05 3:53
Member 202519312-Jul-05 3:53 
GeneralRe: HELP!!!!! working with data grids Pin
d.olsson12-Jul-05 4:14
d.olsson12-Jul-05 4:14 
GeneralDirectShow Applications in VB.NET Pin
Dr_Lomax12-Jul-05 1:56
Dr_Lomax12-Jul-05 1:56 
GeneralRe: DirectShow Applications in VB.NET Pin
Dr_Lomax12-Jul-05 10:50
Dr_Lomax12-Jul-05 10:50 
Generalrichtextbox transparent Pin
yohan4912-Jul-05 1:43
yohan4912-Jul-05 1:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.