Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function updateInvoiceAndPayment() As Boolean
- Try
- Dim conn As String = "Driver={MySQL ODBC 5.1 Driver};Server=173.15.24.2;Database=wsc; User=root;Password=Viku1988!;Option=3;"
- Dim dbConn2 As New OdbcConnection(conn)
- dbConn2.Open()
- Dim invoiceSQL As String = "INSERT INTO wsc.invoice (contNum, empID, medID, medQTY, ordTotal, orderID) VALUES('" + contNum + "','" + Request.QueryString("empID") + "','" + medID + "','" + medQTY + "','" + ordTotal + "','" + Request.QueryString("orderID") + "')"
- Dim paymentSQL As String = "INSERT INTO wsc.payment (ordID, payTYPE, deposit) VALUES('" + Request.QueryString("orderID") + "','" + payTYPE.Text + "','" + deposit.Text + "')"
- Dim invoiceCommand As New OdbcCommand
- invoiceCommand.Connection = dbConn2
- invoiceCommand.CommandText = invoiceSQL
- invoiceCommand.ExecuteNonQuery()
- Dim paymentCommand As New OdbcCommand
- paymentCommand.Connection = dbConn2
- paymentCommand.CommandText = paymentSQL
- paymentCommand.ExecuteNonQuery()
- dbConn2.Close()
- Return True
- Catch ex As Exception
- Return False
- End Try
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement