Guest_imported
New member
- Jan 1, 1970
- 0
I am accesing OracleDb 8.1.5 version using ADO objects in VB. I am able to insert, update and delete records in Oracle DB but when the field is number datatype like(number(10,2)) , I m not able to insert into this field . I am using the following code.
Private Sub Command1_Click()
Dim cn As new ADODB.Connection
Dim rs As new ADODB.Recordset
Dim strConnection As String
Dim strSQL As String
cn.CursorLocation = adUseClient
strConnection = "DSN=TEST;UID=scott;PWD=tiger"
cn.Open strConnection
strSQL = "select * from numbertest"
rs.Open strSQL, cn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs!C1 = 101.5
rs.Update
Set rs = Nothing
End Sub
I am using the Microsoft ODBC Driver for Oracle.
It works fine with the Insert command but it fails for above code.
Can anyone help me with this problem..?
It gives the following error .
"[Microsoft][ODBC driver for Oracle][Oracle]ORA-01722: invalid number" error .
Private Sub Command1_Click()
Dim cn As new ADODB.Connection
Dim rs As new ADODB.Recordset
Dim strConnection As String
Dim strSQL As String
cn.CursorLocation = adUseClient
strConnection = "DSN=TEST;UID=scott;PWD=tiger"
cn.Open strConnection
strSQL = "select * from numbertest"
rs.Open strSQL, cn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs!C1 = 101.5
rs.Update
Set rs = Nothing
End Sub
I am using the Microsoft ODBC Driver for Oracle.
It works fine with the Insert command but it fails for above code.
Can anyone help me with this problem..?
It gives the following error .
"[Microsoft][ODBC driver for Oracle][Oracle]ORA-01722: invalid number" error .