|
can we connect database through c and c++. if yes means how. if not why
s.pradeeba
|
|
|
|
|
yes.
Is this your question meant to c++/cli or Managed c++? If not you are in the wrong forum.
You are letting out some info:
What kind of database? (MySQL, MSSQL...)
|
|
|
|
|
Have you heard of google ? If not, why not ? If so, why didn't you search for this information yourself ?
Is this question about .NET programming ? If not, why is it here ? If so, how do you expect to use C in .NET ?
ADO and ODBC are two good starting terms for your google search.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
pradeeba wrote: if yes means how. if not why
Thankfully, the answer is "yes". I wouldn't know where to begin on the "why?" 
|
|
|
|
|
I have a program which run fine on my computer and on some client computer.
However, recently, it started to crash at launch time with a mysterious error as in the title.
After a bit of investigation it is probably a missing native DLL dependency in a Managed C++ library.
Investigating a bit more with depends I think the culprit is the following:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\msvcm80.dll
On my computer I have 2 versions of it:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\msvcm80.dll
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcm80.dll
But on the target computer I have only one version:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd\msvcm80.dll
And "depends.exe" tells me that my ManagedC++ library is using the other version:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.163_x-ww_681e29fb\msvcm80.dll
Although both version are quite old (06/2006 & 09/2006) (i.e. it's probably not a recent windows update) I think this is the problem.
Now why is the linker is linking to the newer version?
How can I link to the older version?
Any tips?
|
|
|
|
|
Super Lloyd wrote: Any tips?
Yes.
Safe thing.
Update your VS2005 runtime library.
Dangerous mode:
create dir:
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd
and copy msvcm80.dll to that dir.
|
|
|
|
|
It's for a shareware.
I need something that could be automated by the installer....
|
|
|
|
|
Whell, you can use VS2003 or VS2005 and put in also project Dependecy when creating setup with IDE.
Or you can yust copy that dll to your exe folder. In this case, other software woudn't have access to it.
|
|
|
|
|
Which dependency?
I won't just copy a Microsoft DLL in my folders!
And I'm not using an installer project, it's a manually build installer with some 3rd party tool....
|
|
|
|
|
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee
you can download that package, and lunch before install, to install dll
|
|
|
|
|
hu..hu... thanks!
mmhh... and how could I detect that it needs to be installed?
(By the installer)
Thanks for the tips and effort 
|
|
|
|
|
Don't Know. When i was searching my registery, I also saw that this existed also in .NET Framework 2.0.
So, Please try installing runtime on computer to test.
I don't know how shoud you detect.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
here you can find path of the windows folder. In case windows is installed in diffrent partition or in diffrent folder. Then you can yust try to find if a file exists, then. But this can be only if 3rd party setup creator is supporting such scripts.
Or you can yust, make it run and then if users cancels, you contiune setup.
|
|
|
|
|
.NET2 is already installed!
On top it used to (the problem started to manifest itself last week).
Now that I know, next week (it's the weekend now), I will try various fixes.
But ideally I would likde to know how to build so I don't need to install extra stuff!
|
|
|
|
|
Hi
I have to detect either sql server (any version) and db2 are installed on my system or not through c#. Can someone tell me how can i do that?
Regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
You could try the C# forum
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I don't know witch version you use MySQL, MSSQL, ...
For each database, you coud find to detect if is installed, like in registry, Check if Services is running.
I don't know hot to actualy do it, but this is yust a hint.
|
|
|
|
|
I have always thought that free was only used to 'free' memory that was allocated by malloc(), calloc(0, etc. I am looking at lrgacy code and viewing the use of free() to de-allocate a common pointer, not a pointer that was allocated by malloc(). I have found references that says for free(): if the argument does not match a pointer earlier returned by the calloc(), malloc(), [ADV] posix_memalign(), realloc(), or [XSI] strdup() function, or if the space has been deallocated by a call to free() or realloc(), the behavior is undefined. Are these statements correct?
Second question, this legacy code usually has more calloc() and malloc(0 calls that calls to free(). What can result from this? This legacy code is running on a real-time system.
Thanks for any input.
John
John P.
|
|
|
|
|
Hi, John.
Your question tells me that you're programming in C. This is the managed C++/CLI forum. There's no such thing as managed C, therefore, you're in the wrong forum. The Visual C++ forum is the closest we have to a forum for C questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
|
we are doing a project in c++.we have created a database containing information regarding details about all the countries.now we want to include the maps of the respective countries to be displayed as well.is it possible to write any such code wherein we can design colourfulful maps of the countries in c++.
suggestions wll be highly appreciated.
|
|
|
|
|
If you are not writing C++/CLI code, please repost this to Visual C++/MFC forum. You'll get some replies there.
Best,
Jun
|
|
|
|
|
I work on an app that controls a Canon camera in C#. Until now, I used a common C# wrapper for their SDK. They have a new SDK.
So, I wrote a wrapper in C++/CLI. But, it stopped working, it gives an error : The specified module could not be found. (Exception from HRESULT: 0x8007007E). I found on my notebook that creating a vanilla C++/CLI dll with a simple method, and calling it from C#, compiles but gives this error.
On my desktop, however, it works fine. So, I rebuilt the wrapper dll, and integrated it into my app. The same dll, with the same manifest file ( it's also got one embedded ), gives this error in my app, but runs in a very simple app ( which just calls the same methods ). I think the problem is WinSxS ( which has been an utter nightmare for me from day one ), but I have no idea where else to go, it just plain doesn't work, and gives me no clues as to why. Any suggestions met with gratitude.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Whell did you tried to remove manifest file. When i was trying to use manifest, my app woudn't ran, with a realy strange not common error.
|
|
|
|
|
I've tried every combination of embedded and non embedded manifest files. I have it working on my computer now, but my notebook still cannot generate an exe that works, ever, and I'm still curious to hear people's comments on this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|