|
I am missing something when using CDaoRecordset in an AppWizard generated application.
The database is intended to store the peoples name, and email address among other things. The program will display the records one at a time and be able to add records. It will also email the person when the record is added. This all works fine.
A further feature I need is that at various times some of the people may need receive an update email. Adding a filter string and requerying works fine too. The hitch is that indiviuals may be in the database more that once but should only receive one email. SQL does allow for 'DISTINCT myDB.email' to be inserted after the 'SELECT' and will therefore on result in the email address only appearing once.
I can't find how to add this to the requery filter to make it work. Does anyone have an idea.
Happy programming!!
|
|
|
|
|
What does this compiler error try to say to me?
Debug/Suza Utility.exe : fatal error LNK1169: one or more multiply defined symbols found
It can't be that I have declared two variables with same name...
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Have you looked up the error code in MSDN??
MSDN has enough information to help you solve the problem.
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
It can't be that I have declared two variables with same name...
Sure it can, but more probably it's that you've include two other "symbols", such as functions, in the linking process.
You most certainly got some other information too, like what symbol(s) were defined in more than one lib/obj. Well, use that info to track down the problem, or post more info.
/Mike
|
|
|
|
|
The error message should tell you which symbols have been multiply defined. Looking at this information should give you a clue to the problem area.
Michael
|
|
|
|
|
I am having problems loading the Graph32.ocx file for
the Graph Control on a target machine. If I let the
Dialog resources load it, it works just fine. If I try
to load it with the CGraph.Create() call, it fails. I
tried adding the License string to the call but then
it fails on the Developer side. I stepped through the
code and verified the License between the two
different methods.
Any suggestions...........
Thanks in advance.
|
|
|
|
|
Hi.
In our rental-administrative software we have an option to produce and print invoices. In this print-routine I'd like to change what tray the printer selects paper from. The first page will be from tray X (paper with a giro on the bottom of the page) and then I'd like to tell the printer to use paper from tray Y to produce the rest of the invoice.
How can I do this or is it even possible to change printer tray in the middle of a print-job, or do I have to split this print-job into two jobs?
Thanks;)
HarryS - Norway
|
|
|
|
|
I'm starting to get to like GDI+, but it looks there's a couple of things missing (or maybe I just can't find them)...
With the good old GDI it was easy to make a brush with one of the system colors using GetSysColor() or GetSysColorBrush().
Now I want a Gdiplus::SolidBrush() with a system color, is there an easy way to do that?
I can't find anything like GetSysColor() in GDI+
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I believe you'll need to call GetSysColor, store the result and call GetRValue/GetGValue/GetBValue on the COLORREF to build a Color.
No, I'm wrong. Color has a SetFromCOLORREF method. You can put your call to GetSysColor inside a call to that.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi Friends,
I am using a picture control and i want that the user is able to change the bitmap of that control at runtime. The user can select any of his private bitmaps....
Thanx for the help...
|
|
|
|
|
Hi,
I need to know how to use next_permutation.The MSDN example
was not comprehensive.Can some one explain in simpler way please?
Actually , I need a code for combination.I thought of converting the output of perm into comb.
Is there any code around because I wil be writing my own code shortly as I could not find any.
Please help.
with regards,
Helena Ferguson
|
|
|
|
|
Perhaps if you explained scope and context it would be possible start to think of a solution?
next_permutation moves elements around in the (initially sorted) collection to create the permutations of its contents. Each call to next_permutation creates a new permutation of what the container holds until no more permutations can be created, and that's when it returns false.
Do you want all combinations or all permutations of one collection, or are you just looking for all possible combinations of two or more collections?
/Mike
|
|
|
|
|
Mike,
Thanx for your interest.
I need a simpler explation than MSDN using chsr or string or int.
I need all possible combinations in a set.So,I thought of getting all the permutations as a string and then eleminate those with similar elements no mater what the order is,which is what combinaton is.I hope you understood.
So,this is my need.Also please tell me about any code for combination you come across.
Bye.
|
|
|
|
|
Hey Guys
Can anyone see a problem with this code its meant to read a value out of a string in the registry and there is definately a value there. All this does though is display 3 random characters. The dword returns the right length of the string though.
I think that it might be due to the way im trying to convert unicode to asci. If anyone knows a proper way of doing it it would be a great help.
Cheers
Peter
code:--------------------------------------------------------------------------------
TCHAR sInstallDirectory[MAX_PATH];
BYTE sInstallDirectoryUNI[MAX_PATH];
DWORD dwLengthOfInstallDirectory = NULL;
HKEY hUninstallInfo;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\RCAS\\UninstallInfo", 0, KEY_ALL_ACCESS, &hUninstallInfo);
if(RegQueryValueEx(hUninstallInfo, "InstallDirectory", NULL, NULL, &sInstallDirectoryUNI[0], &dwLengthOfInstallDirectory) == ERROR_SUCCESS)
{
TCHAR sTest[10];
ultoa(dwLengthOfInstallDirectory, sTest, 10);
AfxMessageBox(sTest);
for(int i = 0; i <= dwLengthOfInstallDirectory; i++)
{
sInstallDirectory[i] = sInstallDirectoryUNI[i];
}
sInstallDirectory[i++] = NULL;
AfxMessageBox(sInstallDirectory);
}
else
{
AfxMessageBox("Read Reg Entry Failed");
CErrorHandler Error1;
DWORD dwLastError;
dwLastError = GetLastError();
Error1.ResolveError(dwLastError);
}
--------------------------------------------------------------------------------
|
|
|
|
|
Try this code...
CString GetUnstallPath(){
HKEY hKey;
DWORD dwSize;
TCHAR szInstallDirectory[_MAX_PATH];
CString sTmp;
// First off, see if the Reg key exists, if so
if (::RegOpenKey(HKEY_CURRENT_USER,
"SOFTWARE\\RCAS\\UninstallInfo",
&hKey) != ERROR_SUCCESS)
{
sTmp = "";
return sTmp; // empty string or error handling
}
// Get the Value from the Registry
if(::RegQueryValueEx(hKey,
"InstallDirectory",
NULL,
NULL,
(LPBYTE)szInstallDirectory,
&dwSize) != ERROR_SUCCESS )
{
::RegCloseKey(hKey);
sTmp = "";
return sTmp; // empty string or error handling
}
::RegCloseKey(hKey);
// Add a zero termintion
szValue[dwSize] = '\0';
sTmp.Format("%s",szInstallDirectory); // or sTmp=szInstallDirectory
return sTmp;
}
This assums that the Reg Entry is a "normal" string and does not need to be expanded.
hope this helps
|
|
|
|
|
Peter Liddle wrote:
DWORD dwLengthOfInstallDirectory = NULL;
You need to set that to the size of your buffer before calling RegQueryValueEx(). As it is now, you're telling it that you have a buffer of size 0, so it'll never return any data.
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
I have almost finished a program and I want to create a setup App. I was wondering should I go with MS's Installer thingy, use Self-extracting, or a cab file type installation. I don't care which one is easier I am just wondering what you guys would suggest.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
IMHO, Window's Installer is where things are moving. It has some drawbacks. First would be that older systems would have to download the installer programm (1.4meg) if they don't have the installer installed.
Now, for a free MSI option, you can use the Microsoft Visual Studio Installer.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
I was think of it but wasn't sure. Thanks for the advice.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
MHO is that, for a simple program, MSI is about 1000x too much overkill. MSI is great for stuff like Office or VC7, which have a million features. If you just have an EXE and a couple DLLs, there is zero reason to impose MSI (and its 1.5MB download) on your users.
For the CP SearchBar, which is one COM server and a couple other files, I just wrote my own simple installer that prompts for the install dir and drops the files there, and registers the DLL. I then put them in a self-extractor using WinZip. The whole procedure took maybe half a day. I can send you the installer source if you like.
--Mike--
My really out-of-date homepage
Buffy's on. Gotta go, bye!
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Michael Dunn wrote:
MHO is that, for a simple program, MSI is about 1000x too much overkill. MSI is great for stuff like Office or VC7, which have a million features. If you just have an EXE and a couple DLLs, there is zero reason to impose MSI (and its 1.5MB download) on your users.
Good Point
Michael Dunn wrote:
For the CP SearchBar, which is one COM server and a couple other files, I just wrote my own simple installer that prompts for the install dir and drops the files there, and registers the DLL. I then put them in a self-extractor using WinZip. The whole procedure took maybe half a day. I can send you the installer source if you like
I don't really need any code (No Offense). I was planning on creating on for specific use.
Thanks for the tips.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
|
Michael Dunn wrote:
Chill out. I was just saying I wanted to do it by myself.
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
I want to right to a .txt file. I have a formated CString and I want each time it writes to do it on a new line. Can anyone help me?
- Matt Newman
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
|
|
|
|
|
Assuming fOut is a legal output FILE*, and sFoo is your string:
fprintf(fOut, "%s\n", (LPCSTR)sFoo);
Just one of the gazillion ways to do it.
/Mike
|
|
|
|