CDaoTableDef - Changing database field properties (ie.text length)

I'm developing an application that uses the MicroSoft Access Jet DB engine.
This is being done using C++ in 
I need to change the user's db when they use the new version of the program. 
In particular I need to change the length of a text field in a pre-existing 
db without loosing the user's data. When I wanted to add a new field I used 
CDaoTableDef and it worked fine, but I can't locate a method to just update  
an existing field's properties.

Any Ideas on how this can be done??

Thanks, Neil

NeilB (111)
4/26/2005 12:41:02 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 44


if you need to alter the attributes of a tabledef object, you create a new
one from the old one, modify the attributes, then append to the database to
add the new onw, then delte the old one.

however, you can do the column update through SQL - have a look at this

roy fine

"Neil B" <> wrote in message
> I'm developing an application that uses the MicroSoft Access Jet DB
> This is being done using C++ in
> I need to change the user's db when they use the new version of the
> In particular I need to change the length of a text field in a
> db without loosing the user's data. When I wanted to add a new field I
> CDaoTableDef and it worked fine, but I can't locate a method to just
> an existing field's properties.
> Any Ideas on how this can be done??
> Thanks, Neil

rlfine8815 (162)
4/28/2005 1:00:57 AM

Similar Artilces:

1 combo box populating more than one field and retaining info to t
I have a combo box which when a selection is made also populates the 2 other fields. I found how to do this using this great link BUT !! I want the retain the information that populates and feed it back to the relevant table. The control source is how I would normally do this, but in this instance the control source property is a formula to copy from the combo box. Is there a way round this? Many thanks for your help - this is driving me nuts! Sarella wrote: >I have a combo box which when a sel...

Text prediciton
How can I stop excel completing text when I enter data e.g. if a line above says "study day" I enter the line below "student" when I enter "s" it will automatically enter "study day", how do I stop this? Hi, Tools>Options>Edit tab - uncheck 'Enable AutoComplete for Cell Values' HTH Martin Thanks Jason "MartinW" wrote: > Hi, > > Tools>Options>Edit tab - uncheck 'Enable AutoComplete for Cell Values' > > HTH > Martin > > > Boenerge, You may know this, but when the autocomple...

How to change name of company in Money 2007
This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C9BBB5.64E4CA00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello everyone, I have a typo in the name of my company in MS Money 2007. I can't find = where to change it. Can anyone point me in the right direction. Thank you in advance for your help. Kevin ------=_NextPart_000_0010_01C9BBB5.64E4CA00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transit...

Formatting Cells Containing Date Fields That Are Text
Someone here at work imported into Excel a column of text data that looks like mm/dd/yyyy form but need to be mmddyyyy. I thought I could simply highlight the columns, click on Format/Cells/Custom and create mmddyyyy. I do this but the data doesn't change UNTIL I highlight each cell and press F2 or double-click in each cell or create a formula using Right, Mid, etc. When I press F2 or double-click, I notice that an X and a check mark both appear to the right of the Row/ Column box. There's got to be an easier way to do this besides 'onesie-twosie' but we can't figure it...

Exporting to MS DOS Text file
I have an Access Report which I am using to create a text file for upload into a 3rd party application. When Access exports the text file it is creating a carriage return (i.e., empty row) in the first row of the created text file thereby making the file incompatible for upload to the 3rd party. Is there a setting I need to select to prevent this from happening? Any suggestion you may have would be appreciated. Thanks in advance for your help! Regards, ...

Fill Multiple Fields
In my form "Jobs" I have a combo box "Contact" and 3 Text boxes "Cell", "email" and "Work #". The contact information comes from my table "Contacts". I would like the info for the 3 text boxes to be filled automatically upon selecting the Conact from the combo box. How do I do this? Thanks, Rob Rob, Please have a look at this article, which discusses options for handling this type of situation: -- Steve Schapel, Microsoft Access MVP Rob Roy CC wrote: > In my form...

Portfolio Manager won't show daily change of value for mutual funds
I am still using Money Premium 2006. I would like to know if the following problem (feature?) is observed by other folks, either in M2006 or M2007. The Portfolio Manager has columns "Change" and "TotChng." The former is the change in price, per share, of a security for one day. The latter is, roughly speaking, "Change" multiplied by the number of shares held. I don't remember which of these columns is visible by default. I have chosen to view create of these columns in the "custom" view of my Portfolio Manager. My problem is that for mutual funds, ...

Getting Rid of "Ghost Field" on Access Report
Hello All, I'm hoping you can help me with a puzzling behavior exhibited by an Access report. When I attempt to run it I receive an error message asking for a value to a field that is not on the report or the underlying query. I have a report, which I will refer to as MyReport#1. It runs off of a MyQuery#1 without any error messages. I used MyReport#1 as the basis for a second repot, which I will call My Report#2. Everything, in MyReport#2 is identical as MyReport#1 except for one field. MyReport#2 runs off of a different query which I will call MyQuery#2. If I run MyQuery#2 by itsel...

Help! Extract the subject of all mails in outlook to a text file
How can I extract the information, such as subject, sender, time of all the mails in my Inbox into a text file? ------------------------------------------------ ~~ Message posted from ~~View and post usenet messages directly from Switch to a table view that contains all the fields you need the information from, select all items, and press CTRL+C to copy. You should be able to paste the data in columns into a text file. Note that not all available fields will copy in this manner, but the ones you mentioned should work. -- Jocelyn Fior...

easy way to delete all rows with no text in them?
I just took on a client who sends me a multipage spreadsheet weekly with movie times for his 10 theatres. My guess is he just deletes the information from the previous weeks row and adds a new row. His sheet really only needs about 16 columns and maybe 20 rows. The sheets he sends have upwards of 1500 rows and columns. Many of the rows are in between the actual text rows as well. I convert this to a webpage and post to his site. Problem is the sheets are so large they take forever to clean up (in GoLive) and much too long to do by hand. Is there an easy way to delete all rows with no text in...

The spacing between lines of text is not uniform; how can I fix it
Occasionally, lines of text within a paragraph end up unevenly spaced (this has happened in Word and in Publisher). I've checked to make sure the defaults were set to even spacing (e.g., 1 space between lines) and they were. What else can I do to fix this problem? As it stands right now, I think the document looks somewhat sloppy because within just one paragraph I think I have 3 differently-sized spaces between lines. ...

Converting Access 2002 to Access 2003 Database
Hi My company has just updated to Window Xp professional ( Operating System ) and Microsoft Office Xp professional. Previous version were Window 2000 and Microsoft Office Xp professional. I have quite few Access database design in Access 2002 ( ie Office Xp ) When I try to convert this database to Access 2003, it gave me error, saying I need to download and update " Microsoft Jet 4.0 service pack 8". I downloaded and updated my systems. When I try to open this database, I get following error " Security Warning : Unsafe expressions are not blocked. Microsoft jet 4.0 service ...

How can I convert a number to english text in Excel
Is there a way to convert an certain number, to english text in Excel. For eg. An invoice total of $1000 shoul also appear in words (Dollars One Thousand) Hi, See the following:;EN-US;140704&;EN-US;213360 Also check out the following add-in by astien Mensink Super utility one of the functions converts numbers to text lik...

Add or Remove Programs is Missing Change/Remove Buttons
Hi, I'm sure a lot of people had/have this problem, but I'm posting this any way. About 5 out of 40 programs are missing the Change/Remove buttons. All of my previous downloads, let's say about a month ago, are missing the buttons, but the programs I recently downloaded have them. I started having this problem when I downloaded a program from Adobe. I tried all I could. I did the "REGIDIT" thing in Run, but I couldn't find the folders from my previous downloads. I tried a system restore, but it said I couldn't restore my system. This is really making me ...

How do I change the words that pop up when curser is over pic?
I am using Publisher and when I am sending the document words are poping up over different sections and pictures when the curser is over it. How can I change the hidden words and or remove them? Thanks for your help Is the publication a Web page? -- Mary Sauer MSFT MVP news:// "Avi" <> wrote in message >I am using Publisher and when I am sending...

CRM 4.0
Hi! We have just made a migration from CRM 3.0 to 4.0, and everything went well, except one thing - field Resources is disabled (like it's in read-only mode, but it's not!), and we can't find the way to enable it... Any suggestions....? Best regards, Ivica I'm sure this is a bug - we had it on the fax entity with "to" - Team please take note I modifed the xml - after i look ed at a clean xml to see the diffence Pete "Ivica Ivancic" <> wrote in message

GP 9.0 SP3
Hi, I'm a user running GP 9.0 SP 1. If I upgrade to SP 3, does that service pack include the hotfix for the recent changes to the W-2 form, or is that separate? Thanks for your time! ...

How to change format protection default to unlocked?
Apparently, by default, all cells in a worksheet are locked (Format > Cells > Protection). Consequently, when I set worksheet protection (Tools > Protection > Protect Sheet > Password), all cells are protected. I want to protect just 4 cells. So I think I want the default for all cells to be unlocked. Then I would lock the 4 cells and set worksheet protection. Of course, I could manually select every cell in the worksheet (A1:IV65536) and change the Protection format to unlock. But besides being a "pain", it appears to increase the worksheet size &...

vlookup and Access Database Table
Can vlookup be used to get a result from an Access Database Table? Thanks. The vlookup function itself is an Excel function and as such can only retrieve data from an excel sheet. However you may be able to use the import external data menu option in the Data menu to retrieve your data from the access database, pull it into your excel workbook and then use the vlookup function. I never tried this myself, but maybe the idea can be applied. -- Jeroen van Nieuwkerk "finster26" wrote: > Can vlookup be used to get a result from an Access Database Table? > > Thanks....

How do I count unique items in a pivottable data field.
I have a pivottable and I am trying to setup a data field that will count unique values. ie. Listing customers as the row and setting up a field to count the number of sales people that sold to the customer. The base data has multiple rows identifying the customer, sale id, $ and sales person. If I have 100 rows with sales person A, B & C each selling multiple orders to several customers I want the field counter to tell me if 1,2 or 3 sales people sold to each customer. Not the most elegant answer, but I'd probably create my pivot with Customer in the row field, sales rep...

Delete lines of text before forwarding
Getting an email from a subscription service which I auto forward to others. Forwarded email contains the usual header info, then below that some extra verbiage about the service, etc. The first two lines of the email is all I would like to forward. Everything from line 3 down, can be deleted, then I want the email forwarded. Is something that can be done in a macro? ...

change default domain for smtp addressing?
doese anyone know how to change the @domain when creating new email accounts? all help appreciated cheers The recepient policy. You must add all domain address to it. Exchange systems manager - recipients - recipients policies - default policys - email address (policy) Your exchange server will now accept email from the domains entered. Now in AD Users and computers.... if you only want say to get mail from just you must uncheck Auto update email address based on recpipent policy. :o) That was a $250 question i asked microsoft. >-----Original Message--...

Calculations based on 4 possible text strings?
I have this formula that goes into E2 in the first line: =IF(C2<>"",IF(D2="PST+GST",SUMPRODUCT(C2*0.13),"")) which works if the text string PST+GST is found in D2. But I don't know how to branch out from there. There are 4 possible answers to go into D2 which will affect outcome of E2. They are, and I'll list them all including the PST+GST case above: if D2 = text string "PST+GST", E2 = SUMPRODUCT(C2*0.13) if D2 = text string "PST", E2 = SUMPRODUCT(C2*0.06) if D2 = text string "GST", E2 = SUMPRODUCT(C2*0.06) [c...

Convert numeric field to date
Hello, I have a field that is currently formatted as numeric, i.e. 20071129 and need Access to recognize it as date, i.e. 11/29/2007. Tried simply changing the format in table design, but didn't work. I know this is probably really simple . . . any suggestions? Thx. In a query: TheDate: CDate(Mid("20071129",5,2)& "/" & Right("20071129",2) & "/" & Left("20071129",4)) Replace "20071129" with [TheFieldName] -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Bu...

Change the Slide Master for a PowerPoint2010 Side
While creating a presentation I somehow came up with one Master applied to slide number 1 and the another Master applied to slides 2 through 20. How do I change them all to use the first Master? Are you sure you have two masters or could you have a Title layout for slide one and Title & Content for 2 -20 (this is the default)? -- john ATSIGN Free PPT Hints, Tips and Tutorials "AirForce9797" wrote: > While creating a presentation I somehow came up with one Master...