LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Problem updating Excel using ado.net

Here is my code. The "Update" statement gives an
error "Too few parameters. Expected 1"
Thanks in advance for any info. regarding this


Dim m_sConn1 As String
= "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data
Source=dsn=ratesexcelfile;" & _
"Extended Properties=""Excel
10.0;HDR=YES"""
Dim connString As String
connString
= "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=ExcelData2.xls;" & _
"Extended Properties=""Excel
8.0;HDR=YES"""
objconnection = New OleDbConnection(connString)
objconnection.Open() 'open the connection
Dim cmd1 As New OleDbCommand
cmd1.Connection = objconnection
cmd1.CommandText = "UPDATE
[InventoryData$A4:A4] SET A4 = '1' where (A4< 'Cell
I4') "
cmd1.ExecuteNonQuery()
objconnection.Close()
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating Problem with Large Excel File TonyKA Excel Discussion (Misc queries) 3 June 2nd 09 05:39 PM
Bizarre Excel 03 Problem - autosum not updating when cells are cha Angela Excel Worksheet Functions 2 June 30th 07 01:48 AM
Problem with updating links in Excel 2003 Mike Gallof Excel Worksheet Functions 1 October 14th 05 05:17 PM
Problem with updating links in Excel 2003 Mike Gallof Excel Worksheet Functions 0 October 14th 05 04:39 PM
Excel VBA - Updating of data problem teyhuiyi[_2_] Excel Programming 2 April 19th 04 10:38 AM


All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"