View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Problem with .Update

Mike,

Some weeks ago Bob Philips was trying to contact you, he thought I was you
because of the similar sig.

It concerns a post you made some time ago regarding named ranges in Excel. I
don't see him posting tonight but if you send me an email to the address
below I'll contact him and send your email if that's OK.

I think it was this post

http://www.microsoft.com/office/comm...a-261c6be94592

mhughes10 at sky.com


Change the obvious

Mike





"Mike H." wrote:

On the below code, I get an error on the line .Update. The message says

"[SmartWare ODBC Driver] Parameter can not be used in select list." Anyone
have any idea what to do to write a new record to this odbc-compliant table?


Dim cn As ADODB.Connection, rs As ADODB.Recordset
Set cn = New ADODB.Connection
cn.Open "DRIVER=SmartWare Driver (*.db);SERVER=Smart4;DBTYPE=Smart4;DBQ=
" & DataSource
Set rs = New ADODB.Recordset
rs.Open "pr_ckreg", cn, adOpenKeyset, adLockOptimistic, adCmdTable
With rs
.AddNew ' create a new record
.Fields("gross_pay1") = DataArray(X, 18)
.Update
End With
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing