|
|
Thanks for your reply. I tried to do your suggests. I find that the problem is dataset. However i changed the connectionstring in the forms, connectionstring in dataset remains. What i can do for it? Can i write a function to dataset.h? like
"
String^ path = Application::StartupPath;
this->oleDbConnection1->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\""+path+"\\xxx.mdb\"";
"
|
|
|
|
|
Ok..Finally i solved the problem. If anyone has the same problem, just replace the whole path (eg. "C:\Documents and Settings\XYZ\My Documents\Microsoft Visual Studio 2005\Projects\Release\") ConnectionString in Dataset Header with |DataDirectory|
this->_connection->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"|DataDirectory|\\xxx.mdb\"";
and if you have connection in form, write a simple code in Form_Load event, replace ConnectionString with something like :
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
String^ path = Application::StartupPath;
this->oleDbConnection1->ConnectionString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\""+path+"\\hasta.mdb\"";
}
|
|
|
|
|
I get an ASSERT(::IsWindow(m_hWnd)) when i try update a CEdit item in from another class like
Myclass c; c.OnUpdate();
what do i need to do to solve this issue?
Any sugestions appreciated.
|
|
|
|
|
FredrickNorge wrote: what do i need to do to solve this issue?
IsWindow() is returning false because the m_hWnd HANDLE is not a valid HANDLE. Windows have to be "Created" before a HANDLE exists. In MFC look at something like CWnd::Create(.....)
If you are just starting Windows programming you should in use a tutorial and/or invest in book(s).
led mike
|
|
|
|
|
such as.... VERIFY(m_dlg1.Create(Main::IDD, this));
EDIT:
the dialog is already drawn and past OnInitDialog, however i am using tabing so all dialogs are visible at the same time.
-- modified at 18:20 Friday 30th March, 2007
|
|
|
|
|
FredrickNorge wrote: however i am using tabing so all dialogs are visible at the same time.
I don't understand the significance of that.
FredrickNorge wrote: such as.... VERIFY(m_dlg1.Create(Main::IDD, this));
Well that's an example but even an edit control is a window that must be created. Are you creating controls dynamically? Another reason MFC m_hWnd doesn't work is when you try to use them from worker threads.
led mike
|
|
|
|
|
Hello,
I have a COM DLL using 2D safearrays. I want to use the Interface in C# and managed C++ and need to marshall the 2D array somehow. Can anyone help me with the syntax please?
Regards,
|
|
|
|
|
How can I go about making a c++ program that will read a file in hex, search for a particular hex value, and replace it?
Thanks.
|
|
|
|
|
If you had a specific technical question, that would help.
If you don't know the first thing about writing a program, I suggest you examine some beginner's books and tutorials.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
well, first of all, you could ask in the right forum. This is the C++/CLI forum. Second, you could try asking a specific question, instead of one that is very hard to answer properly, because it is so broad.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am looking for an experienced pccts / antlr user!
I have made a (c++) parser using Antlr, now I like to
allow INCLUDE statements in my target files for this
parser.
How to implement this?
So, while parsing, I like my compiler to switch to
another file as it finds the INCLUDE statement as
if it was part of the (main) target file.
Is there a sample project available with such option?
Please respond (or mail to ruudvdmeer@hotmail.com )
|
|
|
|
|
You'll have to implement something called a Preprocessor. The preprocessor looks at the files before the parser ever sees them, and it writes an output file that contains all the "INCLUDE" files in the right order.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
hi all
i want to know about the connectivity of c++ with database sql and
how can i fetch and eneter data into sql database from my front end c++
thanks all
please send me this answer in detail
hi
|
|
|
|
|
please tell me the code for this
thanks
hi
|
|
|
|
|
Maybe you'll get lucky and someone will code this for you, but I doubt it.
See here[^] for possible methods of connecting to a database.
Pick a technology and I'm sure you'll find plenty of example articles here.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
paras_s12 wrote: please send me this answer in detail
1. You have correctly posted this question in VC++ forums, which is most appropriate for this question. So dont cross post.
2. Be patience enough, give time to others to solve your query.
3. Don't go against community rule/spirit, by asking question in rude manner.
4. Finally, Read this[^] post, before posting any further questions in this forum.
|
|
|
|
|
Hello,
I have time hh::mm as string. This string can have * as wildcard .
So,
if time is 13:1*, whenever i query for the next valid time, this should be 13:10,13:11....13:19.
if time is 13:**, the next valid time should be 13:00,13:01,...13:10,13:11,......13:59.
I am finding it difficult to implement this. (in C++)can anybody help me out by suggesting some algorithm.
thanks in advance.
|
|
|
|
|
|
|
As far as I know, ordinary .NET languages do not provide a means to deterministically unload an assembly once it has been loaded by the CLR.
Does this hold true also for C++/CLI?
I would like to be able to unload assemblies for the purpose of auto-updating them while leaving the app's main assembly running. Is this possible?
While I'm at it, am I allowed to use LoadLibrary() and FreeLibrary() with a mixed-mode assembly, or must I use Assembly.Load() ?
-- modified at 20:24 Wednesday 28th March, 2007
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
LoadLibrary and FreeLibrary is used in unmanaged code. I haven't used it with C++/CLI but I believe it can be used to load native DLLs. If you want to load managed assemblies, you use Assembly.Load. However, if you want to have the freedom of loading and unloading assemblies I believe you must create an AppDomain. I have not verified this, so you need to do your own research.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Thanks, George. Info on C++/CLI seems a little hard to come by, so I guess I'll have to do some experimentation.
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|
|
Richie308 wrote: Thanks, George. Info on C++/CLI seems a little hard to come by, so I guess I'll have to do some experimentation.
What George suggested is the only way to do what you want. You cannot directly unload an assembly without unloading all appdomains that have loaded that assembly. And if your primary appdomain has loaded the assembly, this means you cannot unload the assembly at all without exiting the application.
The way to do this is to have a secondary appdomain, load the temporary assemblies there, and when you are done just unload the secondary appdomain - this will unload all assemblies used by that appdomain that are not otherwise in use.
By the way I wouldn't call this C++/CLI specific information - this would fall under general .NET in my opinion
|
|
|
|
|
I am studying Nish's book C++/CLI in Action. In it, we learn that mixed types are not supported, but yet the book shows a wrapper for the Desktop API's that contains functions that mix native types with managed types.
For instance, some of the functions use an HDESK type alongside managed types.
So my question is, what exactly is not supported when they say "mixed types are not supported?"
--------------------------------
"All that is necessary for the forces of evil to win in the world is for enough good men to do nothing" -- Edmund Burke
|
|
|
|