473,387 Members | 1,637 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.

Access Field Types

OHM
OK, before you flame me because this is not an VB/ADO/INTEROP question
rather than a VB.NET/ADO.NET/Interop question, I have not had much luck with
this so you guys are a last resort.

I wonder is someone could help me. We have an Access DB which has a field
type/size we need to change programatically.

I'm sure this can be done via interop, does anyone have a code snippet or
link which would help.

Cheers
Nov 20 '05 #1
7 3948
OHM
Because the customer has the database, but not the access application.
Therfore, we need to generate a service pack to update not only code over
hundreds of sites, but also the Access Tables.

As the tables are full of data, I dont want to delete and recreate the
fields. However, I know a work around is to create a new field, do an action
query and then delete the old column of data, but I want to to this like
access would.

Regards - OHM


"eh" <an*******@discussions.microsoft.com> wrote in message
news:E8**********************************@microsof t.com...
could you explain why you want to do this?

Nov 20 '05 #2
Hi,

I know alter table will do what you want with a sql server
database not sure if it works with access.

http://msdn.microsoft.com/library/de...ALTERTABLE.asp

Ken
---------------------
"OHM" <Me@NoWhere.Com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
OK, before you flame me because this is not an VB/ADO/INTEROP question
rather than a VB.NET/ADO.NET/Interop question, I have not had much luck
with
this so you guys are a last resort.

I wonder is someone could help me. We have an Access DB which has a field
type/size we need to change programatically.

I'm sure this can be done via interop, does anyone have a code snippet or
link which would help.

Cheers

Nov 20 '05 #3
OHM
I kind of gathered this, but didnt want to use this route. I was looking for
an Interop solution really.

Thanks anyway !

Regards - OHM
"eh" <an*******@discussions.microsoft.com> wrote in message
news:D9**********************************@microsof t.com...
Im ***real*** rusty with Access but you should be able to drop columns and then create new ones programatically using access sql, then copy the data
back from the backup you have made :-)
hth

Nov 20 '05 #4
OHM
Thanks Ken, was really looking for a more code based solution. In other
words I want to do what access does, but do it via Interop. I cant find good
material on this, Im sure its there, But I cant see it.

Regards - OHM
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:Og*************@tk2msftngp13.phx.gbl...
Hi,

I know alter table will do what you want with a sql server
database not sure if it works with access.

http://msdn.microsoft.com/library/de...ALTERTABLE.asp
Ken
---------------------
"OHM" <Me@NoWhere.Com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
OK, before you flame me because this is not an VB/ADO/INTEROP question
rather than a VB.NET/ADO.NET/Interop question, I have not had much luck
with
this so you guys are a last resort.

I wonder is someone could help me. We have an Access DB which has a field type/size we need to change programatically.

I'm sure this can be done via interop, does anyone have a code snippet or link which would help.

Cheers


Nov 20 '05 #5
OHM:

Are you trying to use Interop or avoid it? AFAIK, you'll need to use DAO to
fire those changes with access.
"OHM" <Me@NoWhere.Com> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
OK, before you flame me because this is not an VB/ADO/INTEROP question
rather than a VB.NET/ADO.NET/Interop question, I have not had much luck with this so you guys are a last resort.

I wonder is someone could help me. We have an Access DB which has a field
type/size we need to change programatically.

I'm sure this can be done via interop, does anyone have a code snippet or
link which would help.

Cheers

Nov 20 '05 #6
Hi,

I have reviewed the newsgroup and find that you have post a similar post in
the group below.

Subject: Changing Field Type On MS Access using ADO/VB
Newsgroups: microsoft.public.vb.database.ado

I think Gary's suggestion in the group above that to use the ADOX to do the
job is an approach.
Also because ADOX is an COM object we can use it in .NET easier by simply
adding reference to the ADOX library and the VS.NET will generate the
assembly which is used to interop with ADOX COM object automatically.
e.g.
1. right click on the reference in the solution explorer and select add
reference
2. in the Add reference dialog select the COM tab and select the Microsoft
ADO Ext. 2.7 for DDL and Security COM library and click OK

After that we can use the ADOX object in VB.NET similar with what will do
in VB6, you may follow the link that Gary provided.

If you still have any concern on this issue, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #7
OHM
Thank you, this infomation along with Gary's was most helpful. Also thanks
to everyone else who has replied to my original post.

Best Regards - OHM
""Peter Huang"" <v-******@online.microsoft.com> wrote in message
news:GZ***************@cpmsftngxa10.phx.gbl...
Hi,

I have reviewed the newsgroup and find that you have post a similar post in the group below.

Subject: Changing Field Type On MS Access using ADO/VB
Newsgroups: microsoft.public.vb.database.ado

I think Gary's suggestion in the group above that to use the ADOX to do the job is an approach.
Also because ADOX is an COM object we can use it in .NET easier by simply
adding reference to the ADOX library and the VS.NET will generate the
assembly which is used to interop with ADOX COM object automatically.
e.g.
1. right click on the reference in the solution explorer and select add
reference
2. in the Add reference dialog select the COM tab and select the Microsoft
ADO Ext. 2.7 for DDL and Security COM library and click OK

After that we can use the ADOX object in VB.NET similar with what will do
in VB6, you may follow the link that Gary provided.

If you still have any concern on this issue, please feel free to post here.
Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 20 '05 #8

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

Similar topics

3
by: Mosher | last post by:
Hi all, I was wondering if there was any way that I can have a webpage with a text field that acts as a search box and when someone types even one character (letter or number) into the text field,...
3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
9
by: Mike | last post by:
adLongVarChar to 'text' - Mapping ADO types to Native Access types? Okay, so it's not the job of Access to map these types, but has anybody, in the existance of this world ever figured out how to...
3
by: Megan | last post by:
I am not that good at Access and don't know much about it, so I have a few questions for anyone who knows Access very well. First off, I should mention that the company I work for uses Access as a...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
4
by: MIG | last post by:
We have new PCs with XP, but have installed Access 97 for reasons of backwards compatibility. When Access 97 was installed on NT, the Import Text Wizard used to allow the user to highlight each...
3
by: Richard Finnigan | last post by:
Hi I was wondering if anyone could help me with this problem. I've been using VWD and my webhost ( a shared hosting package) have told me that the MSQL express files wont work on thier server so...
0
by: JDMils | last post by:
I am having trouble finding the AutoNumber field of my database with this code. The code is used to replicate a specific table, reproducing all columns including indexes and Primary Keys (there is...
9
by: Ron | last post by:
Hi All, I've recently installed a program written in Access 2000 on a laptop. The laptop had an existing Office 2000 Pro which of course included Access. But the program acts oddly (more oddly...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.