|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding Columns to Jet/Access databaseI need to Add, delete, rename, etc columns in my Jet/Access database in
my app. I know I can add columns for a dataset, and work with it, but as far as I know there is no way to push the added table to the original database via .NET. Is there something I'm missing from ADO.NET that allows this? Or do I have to use the SQL syntax for adding and editing columns? Thanks for your help! John John,
To do what you ask, you n can do using SQL statements (strings) those are executed with OleDbcommand.executenonquery On this page are the SQL commands from access very complete described. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acfundsql.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acintsql.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acadvsql.asp I hope this helps a little bit? Cor Cor,
Oh my god! Those articles go in depth. Who would have known SQL is so deep?! Those links are keepers, thanks! John I searched all 3 links, and there is no command for "Renaming" a table.
I searched the web, and SQL does have a Rename command. Is it not available for Jet/Access? Does anyone know how to rename a table in SQL for Jet/Access? Thanks, John On 29 Jun 2005 08:10:55 -0700, "johnb41" <ord***@informatik.com> wrote: ¤ I searched all 3 links, and there is no command for "Renaming" a table.¤ I searched the web, and SQL does have a Rename command. Is it not ¤ available for Jet/Access? ¤ ¤ Does anyone know how to rename a table in SQL for Jet/Access? I believe that only DAO can do this using the TableDefs collection. Paul ~~~~ Microsoft MVP (Visual Basic) Nope ,,, ADOX can do this to
and is not declared Obsolete by MS :-) as DAO is Show quoteHide quote "Paul Clement" <UseAdddressAtEndofMess***@swspectrum.com> schreef in bericht news:1ff5c1lapbo3f324jteto9t4mhes5atvgs@4ax.com... > On 29 Jun 2005 08:10:55 -0700, "johnb41" <ord***@informatik.com> wrote: > > ¤ I searched all 3 links, and there is no command for "Renaming" a table. > ¤ I searched the web, and SQL does have a Rename command. Is it not > ¤ available for Jet/Access? > ¤ > ¤ Does anyone know how to rename a table in SQL for Jet/Access? > > I believe that only DAO can do this using the TableDefs collection. > > > Paul > ~~~~ > Microsoft MVP (Visual Basic) On Sat, 2 Jul 2005 10:24:52 +0200, "m.posseth" <poss***@planet.nl> wrote: ¤ Nope ,,, ADOX can do this to¤ Yeah it looks like you're correct. You can change it through the Name property: Dim cat As New ADOX.Catalog cat.ActiveConnection = _ "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=e:\My Documents\db1.mdb;" & _ "Jet OLEDB:Engine Type=4" cat.Tables("TableName").NAME = "NewTableName" ¤ and is not declared Obsolete by MS :-) as DAO is Actually they still support DAO. I've queried them on this recently. However, ADO/ADOX is recommended under .NET if you need features not supported in ADO.NET. AFAIK, there is no new development for either. Paul ~~~~ Microsoft MVP (Visual Basic) John,
I hate SQL. For renaming or whatever is AFAIK used in that slang the word "modify". However the best change you have is to follow Armins advice and ask this question in the newsgroep and otherwise follow Pauls advice. Adonet news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet In that newsgroup are people when you awake them with a question about SQL they have direct the answer. I hope this helps, Cor "johnb41" <ord***@informatik.com> schrieb There is no VB language keyword for this. Please note that there is an > I need to Add, delete, rename, etc columns in my Jet/Access database > in my app. > > I know I can add columns for a dataset, and work with it, but as far > as I know there is no way to push the added table to the original > database via .NET. > > Is there something I'm missing from ADO.NET that allows this? Or do > I have to use the SQL syntax for adding and editing columns? > > Thanks for your help! > ADO.Net newsgroup for language unrelated questions: m.p.d.framework.adonet Armin > There is no VB language keyword for this. Please note that there is an (without a semicolumn otherwise it is C#)> ADO.Net newsgroup for language unrelated questions: m.p.d.framework.adonet > cmd.ExecuteNonQuery :-) The rest is Adonet.:-) Cor
Show quote
Hide quote
"Cor Ligthert" <notmyfirstn***@planet.nl> schrieb I'm sure he knows how to call a procedure in VB.> > There is no VB language keyword for this. Please note that there > > is an ADO.Net newsgroup for language unrelated questions: > > m.p.d.framework.adonet > > > cmd.ExecuteNonQuery > > (without a semicolumn otherwise it is C#) > > :-) > > The rest is Adonet. > > :-) :) Armin"Cor Ligthert" <notmyfirstn***@planet.nl> schrieb: Yeah, but hopefully with '()' on the end (although this is not mandatory).>> There is no VB language keyword for this. Please note that there is an >> ADO.Net newsgroup for language unrelated questions: >> m.p.d.framework.adonet >> > cmd.ExecuteNonQuery > > (without a semicolumn otherwise it is C#) -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> |
|||||||||||||||||||||||