Dim cn As New Connection, rs As New Recordset
strTable = "ztest"
'Using the OLEDB Provider instead of the ODBC Driver
'allows you to get around this "invalid number" error, i.e.
'cn.ConnectionString = "Provider=MSDAORA.1;Password=yourpwd;User ID=yourUID;Data Source=myDSN;"
cn.ConnectionString = "Provider=MSDASQL.1;Password=yourpwd;User ID=yourUID;Data Source=myDSN;"
cn.Open
On Error Resume Next
cn.Execute "drop table " & strTable
On Error GoTo 0
cn.Execute "Create Table " & strTable & "(FNUMB NUMBER(38, 4) NULL, PrimaryKey NUMBER(19, 0) PRIMARY KEY)"
rs.CursorLocation = adUseClient
rs.Open strTable, cn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs.Fields("fnumb").Value = 22.22
rs.Fields("PrimaryKey").Value = 1
rs.Update '<-- error! (invalid number)