Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How To Query and Update Excel Data Using ADO From ASP

http://support.microsoft.com/?id=195951

In this link, it talks about how to update the Excel by
ASP (VB), I would like to know how to add a new data into
the field, I try once by using "addnew", but it actually
filled all my emtpy fields with the same data at once,
can anyone help me please? thanks

e.g.

e.g

Before I run that ASP, my excel file has a range with
data like below:

fldTopic fldName fldFace fldMail fldHomepage
fldContent
Testing4 Mouse 4
Sing

After I run the ASP which I would like to only fill in
the next data as below:

fldTopic fldName fldFace fldMail fldHomepage
fldContent
Testing4 Mouse 4

Sing
Testing5 Mouse 4

Test again.

But unfortunately, it fills the range that I've declared
until that range is
full, like below:

fldTopic fldName fldFace fldMail fldHomepage
fldContent
Testing4 Mouse 4

Sing
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.
Testing5 Mouse 4

Test again.

until it is full, e.g. upto row 65536 in excel.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default How To Query and Update Excel Data Using ADO From ASP

"Stan the Mouse" wrote ...

http://support.microsoft.com/?id=195951

In this link, it talks about how to update the Excel by
ASP (VB), I would like to know how to add a new data into
the field
e.g
Before I run that ASP, my excel file has a range with
data like below:

fldTopic fldName fldFace fldMail fldHomepage fldContent
Testing4 Mouse 4 Sing

After I run the ASP which I would like to only fill in
the next data as below:

fldTopic fldName fldFace fldMail fldHomepage fldContent
Testing4 Mouse 4
Sing
Testing5 Mouse 4
Test again.

But unfortunately, it fills the range that I've declared
until that range is full


For ASP, I wouldn't recommend using a recordset to update a data
source. I'd use SQL DML: INSERT INTO, UPDATE and DELETE (Excel doesn't
support DELETE, though).

You Excel table appears to be a defined Name ('named Range') which
extends to row 65536 on a worksheet. This would mean you table is
already full, albeit with nulls! Better to define the Name's range to
coincide with the UsedRange (i.e. just the part with data), in which
case it would expand to fit inserted rows, or use the sheet name as
the table name (possibly with a Range address if required). So, for
your example, I'd use:

INSERT INTO [MySheet$]
(fldTopic, fldName, fldFace, fldMail, fldHomepage, fldContent)
VALUES ('Testing5', 'Mouse', NULL, 4, ', 'Test
again')
;

Jamie.

--
Reply
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
Update Web Query rook Excel Discussion (Misc queries) 3 September 18th 07 05:06 PM
How to update ORACLE query definition in Excel file Viks Links and Linking in Excel 0 January 6th 06 02:56 PM
Use Excel to make an update query to another database table? Reigning in Seattle Excel Discussion (Misc queries) 2 April 14th 05 06:25 PM
1-variable Data Table dependent on MS Query fails to update correctly [email protected] Excel Discussion (Misc queries) 0 March 30th 05 07:43 PM
How access/query/update Excel using VC? Ong Hong Peow Excel Programming 1 September 21st 04 01:59 PM


All times are GMT +1. The time now is 07:14 PM.

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

About Us

"It's about Microsoft Excel"