Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-03-21 : 09:17:32
|
| Charlie V. writes "God Bless us!QUESTIONS:1. How do I know that my INSERT,UPDATE,DELETE TSQL command issued in SQL server7 was successfully Done or not? Here are my codes:'/* MODULE */Public Function GetNewconnection() As ADODB.Connection Dim strconnstr As String Dim objconn1 As ADODB.Connection Set objconn1 = New ADODB.Connection strconnstr = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=cmv;Data Source=CHARLIE" objconn1.ConnectionString = strconnstr objconn1.CursorLocation = adUseClient objconn1.Open Set GetNewconnection = objconn1 End Function'/* FORM */Private sub cmdSAVE_Click()dim Mylastname as stringMylastname = "Valizado"GetNewconnection.Execute " usp_InsEmployee " & "'" & Mylastname & "'"'/* I WANT TO WRITE SOME CONDITIONS HERE base on the return value of the SERVER. */Getnewconnection.closeEnd sub After Executing this command I want my SQL Procedure return a value to the client if the data successfully inserted on not." |
|
|
Jay99
468 Posts |
Posted - 2002-03-21 : 09:29:22
|
I think you might want to take a look at RAISERROR in BOL . . .or you could just have your ...quote: ...SQL Procedure return a value to the client if the data successfully inserted on not
or you could have a look at thisJay<O>Edited by - Jay99 on 03/21/2002 09:29:49Edited by - Jay99 on 03/21/2002 09:32:40Edited by - Jay99 on 03/21/2002 13:12:20 |
 |
|
|
|
|
|