|
Prev: ricerca con apice
Next: How to send a mail with VB6
From: susan on 17 Jun 2008 03:46 Hi, How can I copy a table in an Access-database using Visual Basic 6.0? Thanks, susan
From: Jan Hyde (VB MVP) on 17 Jun 2008 04:00 "susan" <vdb(a)hotmail.com>'s wild thoughts were released on Tue, 17 Jun 2008 09:46:24 +0200 bearing the following fruit: >Hi, > >How can I copy a table in an Access-database using Visual Basic 6.0? I'd say this is more of an access issue than a VB one, in VB6 you just need to execute the relevant SQL on a connection object. I have no experience of access so I've no idea what that SQL would be. J -- Jan Hyde https://mvp.support.microsoft.com/profile/Jan.Hyde
From: Larry Linson on 17 Jun 2008 23:45 Do you have a copy of the appropriate version of Access? Open the database in Access, and in the database window, click the Tables tab, click to highlight the table of interest, on the menu Edit | Copy | Paste, provide the name when asked, and press enter. Otherwise, to where, with what name do you wish to copy it? For all the hype from Microsoft in the VB6 world*, ADO did not prove to be an enduring entity at Microsoft, so most of us who are primarily involved with Access use DAO... with Jet 4.0 databases, you'd need a reference to DAO 3.6 and would need to qualify your Dim statements. Classic ADO has been supplanted by ADO.NET, which is not just "evolutionary" -- it has a different object model. * some sellers of ice-cream or coffees have a "flavor of the month"; classic VB just about had a "flavor of the release" for different data access methods. DAO is the native language of the Jet database engine, so has been there and worked nicely, for release after release, where most of the others are gone and forgotten, now. I have _always_ recommended that classic VB developers equip themselves with a copy of the appropriate version of Access if they are using Access (which is to say, actually, Jet) databases. There are so many maintenance and housekeeping tasks that are trivially easy with Access (this one, for example) that require writing code, debugging, and testing if done in VB. Larry Linson Microsoft Office Access MVP (and VB developer from VB 1.0 - VB 6.0) "susan" <vdb(a)hotmail.com> wrote in message news:2cc98$48576bcf$524b37b6$8302(a)cache5.tilbu1.nb.home.nl... > Hi, > > How can I copy a table in an Access-database using Visual Basic 6.0? > > Thanks, > > susan >
From: Mecha on 19 Jun 2008 04:16 You can use SQL SELECT INTO Statement like: SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source On Jun 18, 9:45 am, "Larry Linson" <boun...(a)localhost.not> wrote: > Do you have a copy of the appropriate version of Access? Open the database > in Access, and in the database window, click the Tables tab, click to > highlight the table of interest, on the menu Edit | Copy | Paste, provide > the name when asked, and press enter. > > Otherwise, to where, with what name do you wish to copy it? > > For all the hype from Microsoft in the VB6 world*, ADO did not prove to be > an enduring entity at Microsoft, so most of us who are primarily involved > with Access use DAO... with Jet 4.0 databases, you'd need a reference to > DAO 3.6 and would need to qualify your Dim statements. Classic ADO has been > supplanted by ADO.NET, which is not just "evolutionary" -- it has a > different object model. > > * some sellers of ice-cream or coffees have a "flavor of > the month"; classic VB just about had a "flavor of the > release" for different data access methods. DAO is the > native language of the Jet database engine, so has been > there and worked nicely, for release after release, where > most of the others are gone and forgotten, now. > > I have _always_ recommended that classic VB developers equip themselves with > a copy of the appropriate version of Access if they are using Access (which > is to say, actually, Jet) databases. There are so many maintenance and > housekeeping tasks that are trivially easy with Access (this one, for > example) that require writing code, debugging, and testing if done in VB. > > Larry Linson > Microsoft Office Access MVP > (and VB developer from VB 1.0 - VB 6.0) > > "susan" <v...(a)hotmail.com> wrote in message > > news:2cc98$48576bcf$524b37b6$8302(a)cache5.tilbu1.nb.home.nl... > > > Hi, > > > How can I copy a table in an Access-database using Visual Basic 6.0? > > > Thanks, > > > susan > >
From: Larry Linson on 19 Jun 2008 23:21 Actually, whether you use ADO or DAO, you have to write and execute the code to Run the SQL statement. Unlike some server databases, the Jet database engine does not have even a simplified user interface to run SQL. If you have Access, it's just point and click in the Query Builder to copy a table -- it creates Access' own dialect of SQL behind the scenes, which may be almost identical to what you posted. Larry Linson Microsoft Office Access MVP "Mecha" <umarinam(a)gmail.com> wrote in message news:33a5b6a5-7264-4b2d-ae9d-621a2e807bf0(a)c58g2000hsc.googlegroups.com... You can use SQL SELECT INTO Statement like: SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source On Jun 18, 9:45 am, "Larry Linson" <boun...(a)localhost.not> wrote: > Do you have a copy of the appropriate version of Access? Open the database > in Access, and in the database window, click the Tables tab, click to > highlight the table of interest, on the menu Edit | Copy | Paste, provide > the name when asked, and press enter. > > Otherwise, to where, with what name do you wish to copy it? > > For all the hype from Microsoft in the VB6 world*, ADO did not prove to be > an enduring entity at Microsoft, so most of us who are primarily involved > with Access use DAO... with Jet 4.0 databases, you'd need a reference to > DAO 3.6 and would need to qualify your Dim statements. Classic ADO has > been > supplanted by ADO.NET, which is not just "evolutionary" -- it has a > different object model. > > * some sellers of ice-cream or coffees have a "flavor of > the month"; classic VB just about had a "flavor of the > release" for different data access methods. DAO is the > native language of the Jet database engine, so has been > there and worked nicely, for release after release, where > most of the others are gone and forgotten, now. > > I have _always_ recommended that classic VB developers equip themselves > with > a copy of the appropriate version of Access if they are using Access > (which > is to say, actually, Jet) databases. There are so many maintenance and > housekeeping tasks that are trivially easy with Access (this one, for > example) that require writing code, debugging, and testing if done in VB. > > Larry Linson > Microsoft Office Access MVP > (and VB developer from VB 1.0 - VB 6.0) > > "susan" <v...(a)hotmail.com> wrote in message > > news:2cc98$48576bcf$524b37b6$8302(a)cache5.tilbu1.nb.home.nl... > > > Hi, > > > How can I copy a table in an Access-database using Visual Basic 6.0? > > > Thanks, > > > susan > >
|
Pages: 1 Prev: ricerca con apice Next: How to send a mail with VB6 |