WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADO DAO
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Playing around with ADO Schemas

Keywords:   ado schemas

As I have more than a few MDB's on the Network linked to ISAM's - this is pretty handy information - just point the Conection to an active File, rather than creating sa new one.
; playing around with ADO Schemas
; Stan Littlefield, August 24, 2002

; standard stuff - create Database to Test with
file                    = StrCat( dirget(),"PSCHEMA.MDB" )
Target                  =  StrCat( dirget(),"PSCHEMA.XML" )
IF FileExist(file) Then FileDelete(file)
IF FileExist(Target) Then FileDelete(Target)

cConn                   = "Provider=MicroSoft.Jet.OLEDB.4.0; Data Source=%file%;"

;if Office 97 use
;cConn="Provider=MicroSoft.Jet.OLEDB.4.0; Data Source=%file%;Jet OLEDB:Engine Type=4"

BoxOpen("Gathering ISAM Statistics","Please Wait...")
cat                     = ObjectOpen("ADOX.Catalog")
cat.Create(cConn)
ObjectClose( cat )

DB  = ObjectOpen("ADODB.Connection")
DB.Open(cConn)

; persist Provider-Specific Information
adSchemaProviderSpecific = -1
JET_SCHEMA_ISAMSTATS     = '{8703b612-5d43-11d1-bdbf-00c04fb92675}';
RS                       = DB.OpenSchema(adSchemaProviderSpecific, ,JET_SCHEMA_ISAMSTATS)
RS.Save("%Target%",1)

ObjectClose(RS)
DB.close()
ObjectClose(DB)
Drop(RS,DB)
BoxShut()
exit


Article ID:   W15241
File Created: 2002:09:05:13:50:46
Last Updated: 2002:09:05:13:50:46