Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #2432
| Message-ID | <4EC0E242.442EA819@telenet.be> (permalink) |
|---|---|
| From | Frans Wauters <fwa@telenet.be> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Create MDB file |
| References | <4EBBB4A0.D5898B11@telenet.be> |
| Organization | telenet.be |
| Date | 2011-11-14 10:41 +0100 |
[Multipart message — attachments visible in raw view] - view raw
FUNCTION MDB_CreateDatabase( cFilename, cPassword, lEncrypt ) AS LOGIC
// http://support.microsoft.com/kb/191754
// http://msdn.microsoft.com/en-us/library/aa140022(v=office.10).aspx
// http://msdn.microsoft.com/en-us/library/dd941291(v=office.12).aspx
// http://msdn.microsoft.com/en-us/library/bb244889(v=office.12).aspx
// http://msdn.microsoft.com/en-us/library/ms803865
LOCAL oCatalog AS OLEAUTOOBJECT
LOCAL cProvider AS STRING
Default( @cFilename, "C:\ACCESS.MDB" )
Default( @cPassword, "Password" )
Default( @lEncrypt, FALSE )
IF File( cFilename )
IF !FErase( cFilename )
RETURN FALSE
ENDIF
ENDIF
cProvider := "Provider=Microsoft.Jet.OLEDB.4.0;"
cProvider := cProvider + "Data Source=" + cFilename + ";"
cProvider := cProvider + "Jet OLEDB:Encrypt Database=" + IIF( lEncrypt,
"True", "False" ) + ";"
cProvider := cProvider + "Jet OLEDB:Database Password=" + cPassword + ";"
* cProvider := cProvider + "Jet OLEDB:Engine Type=5;" // default: 5 = Access
2000, 4 = Access 97
oCatalog := OLEAutoObject{ "ADOX.Catalog" }
oCatalog:Create( cProvider ) // note: to compile, set compiler warning to
none
oCatalog := NULL_OBJECT
Collect()
RETURN TRUE
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Create MDB file Frans Wauters <fwa@telenet.be> - 2011-11-10 12:25 +0100
Re: Create MDB file "Willie Moore" <williem@wmconsulting.com> - 2011-11-10 12:29 -0600
Re: Create MDB file Frans Wauters <fwa@telenet.be> - 2011-11-11 09:55 +0100
Re: Create MDB file Johan Nel <johan.nel@xsinet.co.za> - 2011-11-11 01:39 -0800
Re: Create MDB file E®!k \\/!$$E® <nospam@nospam.url> - 2011-11-11 10:36 +0100
Re: Create MDB file Johan Nel <johan.nel@xsinet.co.za> - 2011-11-11 02:08 -0800
Re: Create MDB file Frans Wauters <fwa@telenet.be> - 2011-11-14 10:41 +0100
Re: Create MDB file Frans Wauters <fwa@telenet.be> - 2011-11-14 10:41 +0100
csiph-web