Article View: borland.public.vdbase.data.sql
Article #196Re: creating tables
From: Romain Strieff [TeamB]
Date: Wed, 06 Jan 1999 00:00
Date: Wed, 06 Jan 1999 00:00
48 lines
2332 bytes
2332 bytes
In article <3692C120.3772F0FD@netfront.net>, pces politely paraphrased
...
> > The following courtesy of Romain (of course):
> >
> > FUNCTION GetDatabaseDir(oDatabase)
> > if type("GetAliasPath") # "FP"
> > extern cint GetAliasPath(cHandle,cString,;
> > cString,cString);
> > IDAPI32 from "DbiFormFullName"
> > endif
> > cRet=space(261)
> > if ( GetAliasPath(oDatabase.handle,"YabbaDabbaDoo","",cRet ) == 0 )
> > cRet=cRet.left(cRet.lefttrim().lastindexof("\"))
> > else
> > cRet=""
> > endif
> > RETURN cRet
> >
>
> Thanks Gary! Thanks Romain! I don't think I'd EVER think of
> somethinglike the above code. It's so complicated, especially with the
> extern function.
----
Not so complicated. It _is_ only the externed function alone, the rest is
only picking out the value it returns.
>
> Edmund
>
> PS: I solved the temporary database file in the wrong directory problem.
> I just
> had to SET DATABASE TO before the Create table and everything worked!
> Of course, I had to get rid of the Query and Database objects as I'd
> figured
> having them on the form might give me instability errors.
---
Use <mydatabase>.executeSQL("create table...") if you want the table
created in that directory, no need for all the stuff above. It's only
needed if you want to place non-table files in that directory as well,
like special .INI files to store the indexes for recreation, or readme
files to explain what those files are and do, to avoid that some
administrator deletes or moves them etc.
--
Romain Strieff [TeamB]
Please read this newsgroup guide below before
posting on the private Inprise newsgroups.
http://www.inprise.com/newsgroups/guide.html
--
Technical Details
Message-ID:
<MPG.10fd09f2c028af96989bbf@forums.inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36905D71.848AE379@netfront.net> <36907CE3.6FAE22E6@ibm.net> <369097C1.615@netfront.net> <3690c578.1416826@forums.borland.com> <3692C120.3772F0FD@netfront.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,e4cce62cc4a643dc X-Google-Attributes: gidff5a1,public From: teamb@opto-pps.com (Romain Strieff [TeamB]) Subject: Re: creating tables Date: 1999/01/06 Message-ID: <MPG.10fd09f2c028af96989bbf@forums.inprise.com> X-Deja-AN: 429297713 References: <36905D71.848AE379@netfront.net> <36907CE3.6FAE22E6@ibm.net> <369097C1.615@netfront.net> <3690c578.1416826@forums.borland.com> <3692C120.3772F0FD@netfront.net> Organization: TeamB Newsgroups: borland.public.vdbase.data.sql