#DELPHI XE10 TQUERY SAVETOFILE WINDOWS#
When Iĭo this on using de WebAppDebugger, this wordks fine (speed is also fine).īut when I create an ISAPI dll en put it on a Windows 2003 Server wich IIS6, Instead I'm using RecordSet.Save (or indirect TADOQuery.SavetoFile). I don't want to use Midas/TClientDataSet, because when transfering aboutĥ0.000 records, the service will get stuk on transfering the data to the The server and then transfer it to the client.
#DELPHI XE10 TQUERY SAVETOFILE HOW TO#
How to convert a Paradox table to a fixed length A.I've created an ISAPI webservice, which used TADOQuery to get some data of.Manipulating a TRadioGroup's Individual Buttons.Simulate an OnCheck event for TListView checkboxes.How to override the standard row selection behavio.Component for Saving User Settings automatically (.Change the look of Hint Window in the Delphi IDE.Outlook Automation - Scaning Outlook's Folders and.Emptying the keyboard queue (key messages).Monitor a directory and take action when files are.Overwrite an existing header or footer in Word.Open a webpage in a webbrowser that's allready active.A class to toggle image display in Internet Explor.Snap a form to another one and move both around.Get the visible rectangle area of a windowed control.Passing String Parameters to WinAPI Functions.Create a XML-file with data from some dataset.Determining the record number in a dBASE/Paradox t.Buttons with wrapped text - use a TBitBtn.Set the TClientDataSet.ProviderName to point to the TDataSetProvider.ĬlentDataSet.SaveToFile('c: \results.xml') Īs long as the type name of the file is xml, it will be a xml-file. Set the TDatasetProvider.dataset to point to your TQuery. There is a simpler way of saving the resultset in a xml-file.ĭrop a TClientDataSet and a TdataSetProvider on the form. WriteData(Stream, Fields, GetFieldStr(Fields)) WriteData(Stream, nil, Fields.DisplayLabel) Stream := TFileStream.Create(FileName, fmCreate) While (Length(Result) 0) or (Min 0) or (Sec 0) or (MSec 0) then WriteString(Stream, ' ' + fld.FieldName + '="' + AString + '"') įunction GetFieldStr(Field: TField): string Procedure WriteData(Stream: TFileStream fld: TField AString: ShortString) Procedure WriteRowStart(Stream: TFileStream IsAddedTitle: Boolean) Procedure WriteFileEnd(Stream: TFileStream)
Procedure WriteFileBegin(Stream: TFileStream Dataset: TDataset) įunction XMLFieldType(fld: TField): string įtString: Result := '"string" WIDTH="' + IntToStr(fld.Size) + '"' įtAutoInc: Result := '"i4" SUBTYPE="Autoinc"' įtCurrency: Result := '"r8" SUBTYPE="Money"'
Stream.Write(SourceBuffer, StrLen(SourceBuffer))
Procedure WriteString(Stream: TFileStream s: string) The second FileName parameter is a name of target XML-file.Ĭopyright(C) 2000, written by Scalabium, Shkolnik Mike The first Dataset parameter is source dataset with data (your Table or Query component, or some other third-party dataset). Procedure DatasetToXML(Dataset: TDataset FileName: string) I want to demonstrate the sample of one procedure for exporting of dataset's data into XML: So for large part of applications we wants to include the possibility of export into XML, of course. Now in the Internet we have a new popular format - XML-file. Sometimes in our development we must export a data from dataset into different formats like MS Excel, Word, HTML, Text etc. How to generate the XML-file from linked dataset?