 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Vijaya Guest
|
Posted: Fri Jul 30, 2004 9:16 pm Post subject: TMemoField.Clear Problems |
|
|
I am using D5, SQL server 2000 with MDAC 2.7.1
I have a Table with following structure.
Table1
(
Col1 Varchar(20)
Col2 integer
Col3 Varchar2(4000).
).
When I use a TTable to connect to the database, Delphi automatically creates all the fields, as it supposed to be.
I have 2 records in the table.
The problem now is with Col3 Field, whic is a TMemoField.
In a Button Click event,
var
aFld: TField;
begin
aFld := DtSrc1.DataSet.FieldByName('Col3');
if not ( DtSrc1.DataSet.State in DsEditModes) then
DtSrc1.DataSet.Edit;
aFld.Clear;
DtSrc1.DataSet.Post;
--- line1
DtSrc1.DataSet.Edit;
end;
After the line DtSrc1.DataSet.Post;
When I watch DtSrc1.DataSet.RecordCount, its increased to 3.
If I close , and open the table, it resets to 2 records( original count).
I think there is a bug in TMemoField/TBlobField.Clear procedure, which increasing the recordcount.
If you put DtSrc1.dataset.Refresh @ line1, Delphi is crashing.
Any Help is appreciated, in resolving this issue.
|
|
| Back to top |
|
 |
pennel Guest
|
Posted: Sat Aug 07, 2004 2:36 am Post subject: how to make exchanges between sql server and xml document? |
|
|
I'd like to make a software in Delphi 7.0 to realize the following
functions:
1. extract data from a xml document and save it in a table, then add it to a
sql server 2000 database;
2. read data from a sql server 2000 database and convert them into xml
document to display or save it to specific place in my computer.
How to realize these two functions in Delphi 7.0?
Thanks for possible reply!
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Sat Aug 07, 2004 6:07 am Post subject: Re: how to make exchanges between sql server and xml documen |
|
|
You may use the SaveToFile and LoadFromFile methods for TADODataset and
specify xml-extension there for file name
As alternative, you may check our SMExport and SMImport suites - xml-format
supported there (a few different formattings)
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
"pennel" <pennel_2000 (AT) avl (DOT) com.cn> wrote
| Quote: | I'd like to make a software in Delphi 7.0 to realize the following
functions:
1. extract data from a xml document and save it in a table, then add it to
a
sql server 2000 database;
2. read data from a sql server 2000 database and convert them into xml
document to display or save it to specific place in my computer.
How to realize these two functions in Delphi 7.0?
Thanks for possible reply!
|
|
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
Posted: Sat Aug 07, 2004 1:17 pm Post subject: Re: how to make exchanges between sql server and xml documen |
|
|
On Sat, 7 Aug 2004 10:36:28 +0800, pennel wrote:
| Quote: | I'd like to make a software in Delphi 7.0 ...
|
Please don't cross post. Choose *one * group and post there.
--
Marc Rohloff [TeamB]
marc rohloff at myrealbox dot com
|
|
| Back to top |
|
 |
Don Guest
|
Posted: Mon Jan 31, 2005 5:28 pm Post subject: Re: how to make exchanges between sql server and xml documen |
|
|
Hello,
I assume that you've probably found a solution to your problem
by now. I am replying in case you didn't, or if you did to
pick your brains on the solution that you ended up settling on.
I have very similar needs, and have boiled down to the For XML
and Open XML extensions to SQL Server 2000 Transact SQL. First
off it does not appear that you have to install SQLXML to be
able to work with these extensions; install SQLXML if you want
browser access to SQL data, or access to the SQLXML managed
classes, and XML Bulk Load. Also, you will need to understand the additional options that will become available in SQL Server 2005.
Once the XML is shredded into relational data I do not have a
need to work with it in XML format. So my solution will likely
involve using Open XML/XML Bulk Load to import the data into
SQL Server 2000.
Don
"pennel" <pennel_2000 (AT) avl (DOT) com.cn> wrote:
| Quote: | I'd like to make a software in Delphi 7.0 to realize the following
functions:
1. extract data from a xml document and save it in a table, then add it to a
sql server 2000 database;
2. read data from a sql server 2000 database and convert them into xml
document to display or save it to specific place in my computer.
How to realize these two functions in Delphi 7.0?
Thanks for possible reply!
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|