473,396 Members | 1,599 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,396 software developers and data experts.

Open another database and change a data type

A97.

I want to be able to use code to open change the data type of a field in a
table in another database - can this be done?

Many thanks.
Keith.
Nov 12 '05 #1
11 4948
Keith Wilby <ke*********@AwayWithYerCrap.com> wrote in
news:Xn************************@10.15.188.42:
A97.

I want to be able to use code to open change the data type of a field in a
table in another database - can this be done?

Many thanks.
Keith.


DAO.DBEngine(0)(0).Execute "ALTER TABLE " _
& "[D:\My Documents\Access\db1.mdb].tbl2002Transactions " _
& "ALTER COLUMN fldDescription TEXT"

Changes field type from binary to text.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #2
Lyle Fairfield <Mi************@Invalid.Com> wrote:
I want to be able to use code to open change the data type of a field
in a table in another database - can this be done?

Many thanks.
Keith.


DAO.DBEngine(0)(0).Execute "ALTER TABLE " _
& "[D:\My Documents\Access\db1.mdb].tbl2002Transactions " _
& "ALTER COLUMN fldDescription TEXT"

Changes field type from binary to text.


Many thanks Lyle, I'll try that now.
:-)
Nov 12 '05 #3
Lyle, I had the impression that you could only use ALTER COLUMN in Jet 4,
and then not with DAO. Is that correct?

The workaround, Keith, would be to:
1. ALTER TABLE ... CREATE COLUMN
2. UPDATE ... (to copy the data into the new column)
3. ALTER TABLE ... DROP COLUMN

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
Keith Wilby <ke*********@AwayWithYerCrap.com> wrote in
news:Xn************************@10.15.188.42:
A97.

I want to be able to use code to open change the data type of a field in a table in another database - can this be done?

Many thanks.
Keith.


DAO.DBEngine(0)(0).Execute "ALTER TABLE " _
& "[D:\My Documents\Access\db1.mdb].tbl2002Transactions " _
& "ALTER COLUMN fldDescription TEXT"

Changes field type from binary to text.

Nov 12 '05 #4
Lyle Fairfield <Mi************@Invalid.Com> wrote:
I want to be able to use code to open change the data type of a field
in a table in another database - can this be done?

Many thanks.
Keith.


DAO.DBEngine(0)(0).Execute "ALTER TABLE " _
& "[D:\My Documents\Access\db1.mdb].tbl2002Transactions " _
& "ALTER COLUMN fldDescription TEXT"


Hi Lyle, thanks for your response. It doesn't seem to like the second
'alter' clause and I can't find anything related in the help. Am I missing
something?

Regards,
Keith.
Nov 12 '05 #5
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in news:3fb8cc0b$0$1747
$5*******@freenews.iinet.net.au:
Lyle, I had the impression that you could only use ALTER COLUMN in Jet 4,
and then not with DAO. Is that correct?

The workaround, Keith, would be to:
1. ALTER TABLE ... CREATE COLUMN
2. UPDATE ... (to copy the data into the new column)
3. ALTER TABLE ... DROP COLUMN


The posted code works on my work machine. I don't know about a requirement
for JET 4. At one time I tried to keep a machine as a pure Access 97
vetting system, and another for AC2K only. But I've stopped doing that and
I run only ACXP now. (How many years has XP been out?). I also download my
WindowsXP updates regularly and I believe these keep JET up to date.

How long will the regulars of this group continue to support Ac97? It's
many years old and it's many versions old. Questions and answers about it
take up space and time. Our supporting an archaic technology compromises
our credibility. Cost? C'MON!

I'd support splitting this group into two parts, one named as now,
Comp.Databases.MS-Access, and the other Comp.Databases.MS-Access.Archaic.
Persons using anything <2K could be directed to the latter.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #6
Lyle Fairfield <Mi************@Invalid.Com> wrote:
How long will the regulars of this group continue to support Ac97? It's
many years old and it's many versions old. Questions and answers about
it take up space and time. Our supporting an archaic technology
compromises our credibility. Cost? C'MON!


Well, FWIW I have no control over the version I use, that's up to our IT
masters, sadly. I did specifically state at the top of my post "A97". You
could have ignored it if you'd wanted to ;-)
Nov 12 '05 #7
> How long will the regulars of this group continue to support Ac97? It's
many years old and it's many versions old. Questions and answers about it
take up space and time. Our supporting an archaic technology compromises
our credibility. Cost? C'MON!


I'll help support whatever version the users/developers are using, all the way
back to version 2.0 - both in the newsgroups and at client sites.

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #8
"Lyle Fairfield" wrote
How long will the regulars of this group
continue to support Ac97? It's many years
old and it's many versions old. Questions
and answers about it take up space and
time. Our supporting an archaic technology
compromises our credibility. Cost? C'MON!


Ask the same about Access 1.0, 1.1, 1.0, 95, 2000, or (soon) 2002 and the
answer is the same: as long as people are still using them, still ask about
them, and someone still knows or remembers the answer.

Haven't you already wasted enough time and energy fighting the version
battle, Lyle? It's as fruitless as demanding that people put the version in
the Subject line (and it's difficult enough, even though it's posted in the
FAQ every day, to get people to summarize the _topic_ in the Subject).

Give Access 2003 a try -- I think you'll like it, except possibly the new
Help interface. Have a good day.

Larry

Nov 12 '05 #9
> I'll help support whatever version the users/developers are using, all the way
back to version 2.0 - both in the newsgroups and at client sites.


That's the spirit Bruce!
I absolutely agree with you. I hope that a lot of us think this way.

Arno R


Nov 12 '05 #10
"Bruce M. Thompson" <bthmpson@big_NOSPAM_foot.com> wrote in message news:<vr************@corp.supernews.com>...
How long will the regulars of this group continue to support Ac97? It's
many years old and it's many versions old. Questions and answers about it
take up space and time. Our supporting an archaic technology compromises
our credibility. Cost? C'MON!


I'll help support whatever version the users/developers are using, all the way
back to version 2.0 - both in the newsgroups and at client sites.


I'm proud of you, Bruce. While I can't match your altruism I'll
continue to work towards the eradication of War, Poverty, STDs and
Donald Rumsfeld, in my own humble way.
Nov 12 '05 #11
rkc

"Lyle Fairfield" <ly******@yahoo.com> wrote in message
news:42**************************@posting.google.c om...
I'm proud of you, Bruce. While I can't match your altruism I'll
continue to work towards the eradication of War, Poverty, STDs and
Donald Rumsfeld, in my own humble way.


Keep a sharp eye out for black helicopters in the night sky.

Nov 12 '05 #12

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

Similar topics

4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
0
by: Unigroup of New York | last post by:
Content-Type: multipart/mixed; boundary="------------C465DF38DCB38DD2AF7117E0" Lines: 327 Date: Tue, 15 Feb 2005 23:36:38 -0500 NNTP-Posting-Host: 24.46.113.251 X-Complaints-To: abuse@cv.net...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
19
by: Steve Jorgensen | last post by:
I've run across this issue several times of late, and I've never come up with a satisfactory answer to the best way to handle this schema issue. You have a large section of schema in which a...
115
by: TheAd | last post by:
At this moment I use MsAccess and i can build about every databound application i want. Who knows about a serious open source alternative? Because Windows will be a client platform for some time, i...
3
by: -xx- | last post by:
Hi, I am new to c# and just trying out c# with ms access. First problem i encountered is how do i open up ms access that has password. Here is my current codes which working fine if there is...
3
by: toffee | last post by:
Hi all, I got a pre-formatted spreadsheet. would it be possible using js to copy the data from a table on the current webpage, open the spreadsheet and paste the content ? if so, anyone got any...
1
by: sunnyluthra1 | last post by:
Hi Everyone, I am working on a piece of code, that displays the properties(Name, Datatype, size & Description) of the table in the database. Now I want to further Enhance the code. I Have created...
1
by: ErikJL | last post by:
I have a simple webservice that performs a SELECT query against a database, and then an INSERT statement on the same database/table. The problem arises at the time when we create the second OleDB...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.