sql - Using two mdbs to Select Into a third -
I have issues creating this SQL string in VB6
select AID .aSTTp, In [AL:] [AL:]: [OFF] of [ALB] in [ALC] at [ALC] in [at: c: \ temporary \ ALPA.mdb] ACT = "Sealed"] LnReg is for MDB with my ADO connection
Error thrown '[c: \ Temp \ ALPA.mdb]' is not a valid name.
[edit] From the syntax error segment [ALPA] in FROM "AID, ASTP, A Aostate, AAG, BLNO, BACNT, B in [ALPA] in C Select .comcontent: \ Temp \ ALPA.mdb "As A left OUTER JOIN [ALX] IN" c: \ Temp \ ALX.mdb "A, AID = BID where AAST =" sealed " / Code> I prefer to add the table to the main MDB file from other MDB files. I use this function to add tables. With the connected table you can do something similar with the local table. AccessLinkToTable (as the sLinkFromDB string, as the sLinkToDB string, as the sLinkToTable string, as the optional sNewLinkTableName string, as an alternative sPassword string) as the Boolean ' Input: path of the original database of sLinkFromDB The path to the database to link 'SLinkToDB' to the link in the SLinkToTable sLinkToDB table name '[SNewLinkTableName] new link table name sLinkFromDB 'Outputs: It succeeds when successful in joining the table' Author: Andrew Becker www.vbusers.com 'Date: 03/09/2000 14:17' Notes: For reference of both ADOs (MS ActiveWeb data objects) A reference is needed and MSDOX. DLL '(MS Ado Extension 2.5 DLL and Security). 'Amendment: 21.1.2002, as the Roman Plisk, ADOX, as a password DMTRDB DMTLL Block ADOX. Error on Gato Arrifald lane (Derek $ (sLinkFromDB)) 0 and lane (Dir $ (sLinkToDB)) 0 Then set the database 'set catDB = new ADOX.Catalog' to open the database in which the database is created. CatDB Active connection = "provider = Microsoft.Jet.OLEDB.4.0;" & Amp; "Data Source =" & amp; Do sLinkFromDB set TblLink = So ADOX.Table 'name a new table with new TblLink Lane (sNewLinkTableName) then .Name = sNewLinkTableName otherwise .Name = sLinkToTable finally set ParentCatalog property' Open Catalog. Set "This property allows access to archive .ParentCatalog = catDB 'property is set to link .properties (" Jet OLEDB: Create Link ") True .properties = (" Jet OLEDB: Link Data Sources " ) = sLinkToDB .properties ( "jet OLEDB: remote table name") = SLinkToTable the lane (sPassword) then .properties ( "jet Oledibi: link provider string") = "MS access; PWD =" & amp; With the addition of table for the SPSword End and End Tables Collection. CatDB.Tables.Append TblLink set catDB = set something back in the form of success as AccessLinkToTable = True End If ErrFailed exit function: Go to error 0 AccessLinkToTable on GoTo = False End Function Function AccessLinkTableUpdate (sLinkDatabasePath string for, as sLinkToNewDatabase string, sLinkTableName delete as Adiokskkam as Adioaks as Boolean as a string). Set up error configuration catDB = Open a catalog on the new Adox.Cabel database, which contains the table to refresh the CatDB. Active connection = "provider = Microsoft.Jet.OLEDB.4.0;" & Amp; "Data Source =" & amp; sLinkDatabasePath so catDB.Tables (sLinkTableName) .Type = "link" Then catDB.Tables (sLinkTableName) .properties ( "Jet OLEDB: Link Data Sources") = sLinkToNewDatabase AccessLinkTableUpdate = true end is not set catDB = Some exit Function ErrFailed: error on goto 0 AccessLinkTableUpdate = Wrong End Function
Comments
Post a Comment