|
-
Oct 31st, 2002, 03:29 PM
#1
Thread Starter
Lively Member
Trouble updating record using ADO with Oracle dB
I am using the following code just to update one record. I am able to update records using SQL*Plus in my Oracle dB. My code (shown below), runs fine UNTIL I get to the rs.Update. When that happens, the application just hoses. I left it sit for about an hour with no success.
Since fgCn is a variable that I am calling, here is what is inside that called variable (maybe that will help).
Provider=MSDASQL.1;Extended Properties="DRIVER={ORACLE ODBC DRIVER};SERVER=9z_pmsd;UID=fennigbr;PWD=xxxxx;DBQ=9z_pmsd;DBA=W;APA=T;PFC=10;TLO=O;"
I can read records just fine. I just can't update them. I do have write cabibilites to the database since I can update records using SQL*Plus.
Private Sub btnUpdateRecord_Click()
Dim TempSQL As String
Dim Rs As ADODB.Recordset
Dim A As String
Dim Count As Integer
lblTime.Caption = ""
If txtF4Date.Text = "" Then
MsgBox "Please enter a valid date by double clicking on the date text box.", vbOKOnly + vbExclamation
Exit Sub
End If
TempSQL$ = "SELECT PIIN_SPIIN_ID, A3_PURCH_OFC_ID, F4_SIGNATURE_DT FROM PMS.TPMS05_DD350 WHERE PIIN_SPIIN_ID = '" & fgPSQuery$ & "'"
Set Rs = New ADODB.Recordset
Rs.CursorLocation = adUseClient
Rs.Open TempSQL$, fgCn, adOpenDynamic, adLockOptimistic
If Rs.EOF = False And Rs.BOF = False Then
Rs("F4_SIGNATURE_DT") = txtF4Date
Rs.Update '*****HOSES UP RIGHT HERE*****
Rs.Close
Set Rs = Nothing
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|