|
I would like to get some code for opening a Access database. So that I can use an Excutable to open a the database rather than the .mdb Im not that familuar with Visual C++ but thats all I have avalible to me but I do know the basics Thanks for any help.
|
|
|
|
|
For starters, create a new MFC AppWizard (exe) project via AppWizard. One of the steps will ask if you want database support. Reply in the affirmative. You will then need to select an existing DSN. After that, you select the table and the columns you are interested in. The default query that is generated for you is something like "SELECT * FROM <whatever table="" you="" chose="">".
If you have an existing MFC project, you can derive a new class from CRecordset . It will prompt you for the same DSN, table, and column that AppWizard did.
When you get this far, come back and ask some more questions. It's easier to go a few steps at a time.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Okay this probably sounds weird I know a little about ADO but all I want to do is have an EXE open a mdb and still have it open in access. Thanks again. By the way i would love to do my whole database with ado but there so many things i dont yet know how to do in C++ that I can do in Access. Thanks again.
|
|
|
|
|
thetuxpenguin wrote:
all I want to do is have an EXE open a mdb and still have it open in access.
Then it sounds like you simply need to use ShellExecute() with the "open" verb. Use the absolute path to the .mdb file as the third parameter.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks your awsome could you show me an example..
|
|
|
|
|
See here and here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have an existing VC6 C++ application that I'm using to post http calls into a .NET web service. One of the methods on this web service returns a DataSet object which has pretty complicated XML; including base64 encoded binary blob fields. Has anyone attempted to create a C++ class that can emulate the C# DataSet class; and be able to parse that XML and provide accessors to the rows and column values? I am going to have to do this, but thought I would first see if there was any exising code I could make use of rather than re-inventing that wheel.
Thanks if anyone has a starter block of code they don't mind sharing.
Ron Ward
|
|
|
|
|
Is there any utility which converts VC++ code to C# code. I do not expect all conversions basic conversion will do such as class, property, method migration.
Thanks
Shyam
|
|
|
|
|
i believe no... you must rewrite all the VC++ Code into C#...
in fact you must redesign the code to get the best performance in C#...
|
|
|
|
|
What is the best was to get the modified date/time of a file ?
I'm using VC++6.0.
Thanks.
Elaine
The tigress is here
|
|
|
|
|
How about GetFileAttributesEx() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
or CFile::GetStatus() or _stat() or GetFileTime() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thanks Ravi,
I'd seen GetFileTime on VC6 but it only talked about WinCE !
I checked again at home where I have .NET2002 after your reply and it listed NT/2000/XP too. Odd
Elaine
The tigress is here
|
|
|
|
|
Trollslayer wrote:
I'd seen GetFileTime on VC6 but it only talked about WinCE
That was me messin' with yer PC.
See this[^] link.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
I have the following problem :
I have written a MDI Application opening and reading files of type *.myapp
I have made a file association with my application and when a user clicks a file with the extension *.myapp my application starts but does not load the file.
I know I have to read the parameters the shell passes to my program, but I do not know how. And I do not know for which event I should write a handler.
modified 9-Mar-17 17:23pm.
|
|
|
|
|
Daniel Kanev wrote:
I have written a MDI Application opening and reading files of type *.myapp
Did you use AppWizard for this?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
In visual studio .net ver 2003 in reguards to c++ my multiplication is messed up. I get a result of 0 when I try and multiply the following. What's wrong?
#include "stdafx.h"
#using <mscorlib.dll>
#include "math.h"
using namespace System;
int _tmain()
{
__int64 p;
p= 16 * 268435456;
Console::WriteLine(p);
return 0;
}
|
|
|
|
|
I assume that the WriteLine() method supports a __int64 type. What is the largest value (e.g., 231) that you can successfully send to WriteLine() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
The number I am multipling with 16 is the highest number for the output.
|
|
|
|
|
If 228 is the highest number for the output, what does outputting 228 + 1 produce? If that does not work, I would expect 232 to fail as well. Yes?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
The highest number I can multiply it to is 7 after that I get the error message:
warning C4307: '*' : integral constant overflow
|
|
|
|
|
That indicates that you are running into a signed/unsigned problem. What does this yield:
p = 8U * 268435456U;
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
What about:
unsigned __int64 p;
p = 16U * 268435456U;
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|