Re: Filername ?



"Stark" <franco.jommi@xxxxxx> wrote in message news:48fbb50e$0$1074$4fafbaef@xxxxxxxxxxxxxxxxxxxxxx
In the statement: Select * from "MyDatase.dbf" "MyDataset.dbf" needs to be the actual filename on disk.
Since I need to apply the same Select statement to different datasets (on disk I name them with a suffix like MyDataset_1, .._2, etc.), how can I do it ?

A normal Table, would allow me to set programmatically a different Tablename .. But with a TQuery, while I can set Databasename, there is no property correspondig to Tablename.


You could use query parameters. What I often do is construct a simple function to return the query text, something like

function setQueryTableName (const tblName, qryText : string) : string;

begin
result := StringReplace (qryText, '@TableName', tblName, [rfReplaceAll, rfIgnoreCase]);
end;

.



Relevant Pages

  • Re: Weird Problem
    ... Now, the question....In order to have SFC work properly, I need to change ... a mod date in 2005 for a windows update .dll. ... 80G HD's and I do have full disk clone backups using Acronis True Image on ... Sourcepath would be a string in the setup key, so it would appear on the ...
    (microsoft.public.windowsxp.general)
  • Re: Weird Problem
    ... The sourcepath string currently containing H:\ should point at the I386 ... The 'date modified' ranges from the time of XP install ... 'signed updates' to alleviate the error window asking for the XP disk. ...
    (microsoft.public.windowsxp.general)
  • Re: how to convert char* to File *
    ... char* for the content,and I think saving char* to a file and opening it ... So you have a string, and you want to arrange for that string to be ... from a disk file will be too slow. ... There's nothing in the C standard that says a FILE* has to be ...
    (comp.lang.c)
  • Re: Weird Problem
    ... Sourcepath would be a string in the setup key, so it would appear on the ... just thought I would run the 'sfc ... the DLL cache and to insert the XP disk. ... on them the associated item opens in Windows Explorer. ...
    (microsoft.public.windowsxp.general)
  • Re: reading IECache files
    ... The fact that the wire is cached on the disk isn't something ... Private Function GetStrFromPtrA(ByVal lpszA As Long) As String ... Call lstrcpyA(ByVal GetStrFromPtrA, ByVal lpszA) ...
    (microsoft.public.vb.winapi)