|
grahamoj wrote:
I have tried setting it in the database in the design view but it will only allow a maximum of 255 chars
Thats probably because it can't be any longer. So it won't help you if you did it from your program.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Use a Memo field type; these can be 64,000 characters long. A Memo type doesn't have a Length property, so your code will have to handle the 600 character limit prior to storing the values in the table. Hopefully Access doesn't reserve the entire 64,000 character space for each Memo field - that would get ugly really fast - but the Help info doesn't mention how it is implemented.
It is ok for women not to like sports, so long as they nod in the right places and bring beers at the right times.
Paul Watson, on Sports - 2/10/2003
|
|
|
|
|
Hi grahamoj, text can be maximum of 255, however a memo as others have pointed out will suit and the JET database engine doesn't waste any unused space so no problems there.
In order to create fields or modify them programatically (and in the easiest possible way, there are others) you need to use data definition sql statements:
See here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnacc2k/html/acfundsql.asp[^]
See also in that article at the bottom the intermediate and advanced articles. That should give you all the info you require.
This is something I have done a *lot* but through ADO, not odbc so I can't give you anything more specific.
|
|
|
|
|
Thanks will check it out.
grahamoj.
|
|
|
|
|
I have created a MDI application.Then I have created to views. One from CView Class and other from CFormView class.When I click on the new in the menu Two windows are created one with CView and other with CFormView through OpenDocumentFile().I have also created two Document templates but both are having same CDocument class. Now I want that when i do something in the CView(Click etc..) one of the functions of the CFormView should be invoked.i.e when clicking in the CView i want to send message to the other CFormView and vice versa ?
How can i ?
manoj Kumar Dalei,
IIT Delhi
|
|
|
|
|
If the views belong to the same DocTemplate, get the CDocument pointer of one view and call UpdateAllViews method. Use the hint parameters to let the receiving view know to whom the update is for.
|
|
|
|
|
One solution is to call a functio in main frame and have it route the data to whatever view accordly.
Kuphryn
|
|
|
|
|
It might not be a good solution. If you do not like architecture of MFC(as many of us) - do not use it. There is very well defined way for view notifications in MFC (UpdateAllViews). Custom solution like this increase maintenance problems.
|
|
|
|
|
Correct. Nonetheless, there are situations where custom routing in an MFC application is key. One situation is updating a selected view or object within a selected view.
Kuphryn
|
|
|
|
|
How to Rotate the Enhanced MetaFile without using SetWorldTransform?
|
|
|
|
|
we have a single program, very large, so far, pure h/c++ code is over 6M. as customers request, the program is still expanding ...
it works fine now. i am not sure but i do worry about that someday the program will crash because of its size.
do u know if there is limited program size for a single application - if over the size, it can't be executed?
thx
includeh10
|
|
|
|
|
includeh10 wrote:
do u know if there is limited program size for a single application - if over the size, it can't be executed
Naaa, I don't think you'll ever reach a limit. As long as there's enough ram in the clients computers
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
No, it shouldn't crash at any time just because the executable is large. If you worry about the size you could put the most important code of you exe into seperate DLLs. Guess how complex programs do that: E.g. the executable of UnrealTournament 2003 is only about 900kbyte. Can you imagine how large it were if all the code of the DLLs would be inside the executable?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
includeh10 wrote:
do u know if there is limited program size for a single application
Yes, 2GB. That's the max amount of memory a user-mode process can occupy in Win32 (on 2K adv server you can make that 3GB with a switch in boot.ini).
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Can you imagine the amount of source code required to create a 2GB executable? It would have to be a very complex app, or one with a lot of constant data, or both.
Not to mention the days/weeks required to compile the sucker...
Software Zen: delete this;
|
|
|
|
|
Hello
In my project I need some way to show text with pictures, font colors and tables in two columns on each page, but with ability to set no-column mode. It should look like MSWord pages view.
If anyone knows of such a view class or the way to make CRichEditView show columns and page breaks or even some thoughts from where to start searching, please, answer me here or e-mail to archigal@mail.ru.
Thank you in advance
|
|
|
|
|
I'm not sure whether CRichEditCtrl can display a word document with tables in it. What format is your data in?
In all honesty, it sounds like this is a job for an HTML view rather than a rich edit. I find CRichEditCtrl a pain, but CHtmlView is a lot easier to drive.
Also, MFC 7 has an HTML edit control which you might want to take a look at if you need to enter data.
Anna
www.annasplace.me.uk
"Be yourself - not what others think you should be" - Marcia Graesch
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
|
|
|
|
|
hi, anna,
i still use VC 6, did u try if html edit control (VC 7) can load java JApplet object?
(sorry, not for original post)
includeh10
|
|
|
|
|
|
Thanks for the answer
I've thought of using HTMLView in my project, by I don't know how to create columns (not tables) in HTML
CRichEditCtrl can display tables - checked.
The data is stored in the MSSQL database in the SGML format.
I've almost forgot - the view can be read-only but with support of copy operation.
|
|
|
|
|
As I understand it, the way to create columns in HTML is to either use tables or frames to hold the content...though neither is an ideal solution if you need text to flow from one column to the other (not very common apart from printed media, it has to be said).
If it's not possible in HTML, it's probably because it doesn't make sense on a display the way it does on the printed page.
Good luck.
Anna
www.annasplace.me.uk
"Be yourself - not what others think you should be" - Marcia Graesch
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
|
|
|
|
|
Anna-Jayne Metcalfe wrote:
if you need text to flow from one column to the other (not very common apart from printed media, it has to be said).
Yes, text should flow from one column to another.
And I understand it is not common after spending a week surfing inet for the solution
It probably should look like the print preview (use CPreviewView in some way ? ).
Thanks again
|
|
|
|
|
Forgive my ignorance, but exactly why do you want to flow text between columns like this?
It actually makes things rather difficult for a reader as they keep having to scroll back up to the top of the page when they reach the bottom of a column. That's why tables work so well on the web - they separate content.
As far as CPreviewView goes, Print Preview implementations normally use raw (i.e. GDI) code to do their drawing so I really doubt that would help you.
Anna
www.annasplace.me.uk
"Be yourself - not what others think you should be" - Marcia Graesch
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
|
|
|
|
|
I don't need them at all - it's the client's willing. They think it helps the operator to read faster with text in two columns. 2-3 times faster. Never checked those numbers...
And the program is used not only for viewing documents, but also for printing too. I think up to 25% persent of the viewed documents would be printed - it's an organization with lot's of paper work.
|
|
|
|
|
Yuck.
I'm sure they're mistaken, but if they're dead set on it you may well be stuck.
Have you considered PDF? I know it's a pig to program (I've no experience on it myself) but it should do the columns with no problem, and has the benefit that the screen and printed versions will be consistant.
AFAIK even Word is a bit flakey working with true columns (and Wordpad doesn't do it at all) so you might be pushing your luck to get CRichEditCtrl to do it.
Anna
www.annasplace.me.uk
"Be yourself - not what others think you should be" - Marcia Graesch
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
|
|
|
|