473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Adding Columns to Jet/Access database

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!

John

Nov 21 '05 #1
11 1403
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/de.../acfundsql.asp

http://msdn.microsoft.com/library/de...l/acintsql.asp

http://msdn.microsoft.com/library/de...l/acadvsql.asp

I hope this helps a little bit?

Cor
Nov 21 '05 #2
"johnb41" <or****@informatik.com> schrieb
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!


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
Armin

Nov 21 '05 #3
> 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.

:-)

Cor
Nov 21 '05 #4
"Cor Ligthert" <no************@planet.nl> schrieb
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.

:-)


I'm sure he knows how to call a procedure in VB.

:)

Armin
Nov 21 '05 #5
"Cor Ligthert" <no************@planet.nl> schrieb:
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#)


Yeah, but hopefully with '()' on the end (although this is not mandatory).

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
Cor,

Oh my god! Those articles go in depth. Who would have known SQL is so
deep?! Those links are keepers, thanks!

John

Nov 21 '05 #7
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

Nov 21 '05 #8
On 29 Jun 2005 08:10:55 -0700, "johnb41" <or****@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)
Nov 21 '05 #9
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/microsof...amework.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
Nov 21 '05 #10
Nope ,,, ADOX can do this to

and is not declared Obsolete by MS :-) as DAO is


"Paul Clement" <Us***********************@swspectrum.com> schreef in bericht
news:1f********************************@4ax.com...
On 29 Jun 2005 08:10:55 -0700, "johnb41" <or****@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)

Nov 21 '05 #11
On Sat, 2 Jul 2005 10:24:52 +0200, "m.posseth" <po*****@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)
Nov 21 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Bobbak | last post by:
Hello All, I have these tables (lets call it ‘EmpCalls', ‘EmpOrders', and ‘Stats') that each contain the list of EmployeeIDs, I want to be able to create a Module in which I could call in my VB...
1
by: RC | last post by:
I have an Access 2002 database with many tables and forms (but just to keep things simple, let's say the DB has one Table "Table1" and one Form "Form1"). I have managed to cobble together so much...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
12
by: Art | last post by:
Hi everyone I was hoping someone might be able to help me with this. I'm just starting to try to work with MS Access tables through VB.net. In Access I can take an existing table and add a new...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
2
by: canoewhiteh2o | last post by:
I am having trouble adding data columns to a disconnected database. I first load a datatable using: private DataTable dtMacros = new DataTable(); private ArrayList macro = new ArrayList();...
2
by: rfdjr1 | last post by:
I'm using MS Access 2000. I have a small database to keep track of my lighthouse collection. Right now it's only two columns. I'd like to add a third. I'd like the new column to be the third...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.