|
I have picked a project that involves Database progamming and I have never worked with databases before. I was wondering if anyone has any website reasourses that I can goto to start learning how to write database programs.
|
|
|
|
|
First thing you need is a database. I recommend downloading MSDE or Sql Server 2005 Express Beta from Microsoft. Then read the MSDN, and articles on this site, on how to interact with it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Do a google search for sql. You will get plenty of answers. Might have to narrow it down a little, but that is good practice.
There is a reason I didn't give you a site: you need to learn to use google instead of asking, it is faster and easier in the long run.
I don't know that I'd recomend MSSQL as strongly as the other guy, but it works. mySQL is popular, postgreSQL is free and good. Oracle is the most popular. There is also DB2. And you can write your own if there is something specific you need to do.
Stay away from toys like Microsoft Access. Access works, but it isn't very good in subtile ways that you may or may not discover for years. (MySQL is a toy too)
|
|
|
|
|
Hello,
I'm getting an internal compiler error C1001. Microsoft says it's a bug. More information on the bug can be found here[^].
I triple checked my compiler options for the /Zg option, and it's simply not specified, but I do get the error C1001.
This error comes up when I want to initialize a private static array of structs.
<br />
class a : public CMessageBase<br />
{<br />
private: <br />
static const MYSTRUCT *myStruct[]; <br />
};<br />
const MYSTRUCT *a::myStruct[] = {{0, 0, 0, 0}};<br />
Does anybody have an idea?
Thanks in advance
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
I'm getting an internal compiler error C1001. Microsoft says it's a bug. More information on the bug can be found here[^].
The internal compiler error (affectionally called ICE) means just that the compiler crashed for whatever reason. It is a bug in the compiler, simply put. There are tons of situations leading to an ICE, at least in MSVC 6.0. Some of these situations involve valid C++ code (that usually is too complex for MSVC), and some other situations involve illegal C++ code. Even in the latter case, the problem remains primarily with the compiler, as crashing is not a reasonable response to a program, incorrect as this might be. At least, you still have the chance to try to determine by yourself what the problem in your code is and try to get the compiler back to sanity.
In this particular case, I think your code is wrong. The line
static const MYSTRUCT *myStruct[]; declares an array of pointers to MYSTRUCT s, while
{{0, 0, 0, 0}} looks more like an array of MYSTRUCT s. Could this be your problem?
Also, the MSKB article you refer to is just a situation leading to an ICE, but I don't think it has anything to do with your particular problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Hello,
Thanks for your reply. The problem was indeed with my code using a 2D array of pointers. After I rewritten the code using 2 seperate arrays (one of pointers, one of MyStructs), it works perfect.
Anyway, here is the solution of the problem:
<br />
class a : public CMessageBase<br />
{<br />
private: <br />
static const MYSTRUCT* MyStructs[2];<br />
static const MYSTRUCT MyStruct[]; <br />
};<br />
const MYSTRUCT* a::MyStructs[] = {NULL, &a::MyStruct[0]};<br />
const MYSTRUCT a::MyStruct[] = {{},{}};<br />
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
you are declaring an array of pointres to mystruct. you cannot initialize them to zeros(to NULL yes ) but not zeros. or so am lead to believe.
|
|
|
|
|
Anonymous wrote:
you cannot initialize them to zeros(to NULL yes ) but not zeros.
Have 0 (zero) and NULL suddenly become different?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Bob Stanneveld wrote:
I'm getting an internal compiler error C1001. Microsoft says it's a bug. More information on the bug can be found here[^].
Not necessarily. C1001's can be caused by lots of things. Most likely, the compiler is getting confused by other errors that it hasn't had a chance to print out yet.
Is there any reason why you're not giving the array a size? Try giving it one and see if that works.
Also, I'm not sure you can initialise a pointer to a structure with the {} method. Is your intention above to initialise the array to 4 pointers pointing to NULL? If so, you've got too many {'s - just use { 0, 0, 0, 0 }.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hello,
I think that the thing I was trying to do is impossible the way I wanted to, leading to incorrect syntax. After rewriting the thing, solution posted above, it works like a charm.
Thanks for your help.
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Hi!
I have created a dialog-based application, and I want to create accelerators. For example, when the user presses F2 key, I want to show the aboutbox dialog.
In the OnInitDialog function, I added the following lines:
<br />
HACCEL m_hAccel=::LoadAccelerators(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDR_ACCELERATOR));<br />
ASSERT(m_hAccel);<br />
m_hAccel is defined as HACCEL.
Also, I added the following member function:
<br />
BOOL CCRDlg::PreTranslateMessage(MSG* pMsg)<br />
{<br />
if (m_hAccel != NULL && TranslateAccelerator(m_hWnd, m_hAccel, pMsg))<br />
return TRUE;<br />
<br />
return CDialog::PreTranslateMessage(pMsg);<br />
}
My Resource definition is defined like this:
<br />
<br />
IDR_ACCELERATOR ACCELERATORS <br />
BEGIN<br />
VK_F2, ID_ABOUT, VIRTKEY, NOINVERT<br />
END
But this code doesn't work, my accelerators don't generate a WM_COMMAND.....
What's the problem?
Thks in advance!
Appstmd
http://www.atlence.com
|
|
|
|
|
Atlence wrote:
In the OnInitDialog function, I added the following lines:
// Accelerators
HACCEL m_hAccel=::LoadAccelerators(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDR_ACCELERATOR));
You cannot expect other member functions to have access to this local variable. The variable must belong to the class.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi!
I'm looking for a way to draw transparent Slider controls, instead of drawing it with a grey background.
Is there a message to handle like other control (WM_CTLSTATIC,...)?
Thks in advance!
Appstmd
http://www.atlence.com
|
|
|
|
|
Hi guys,
I know about nothing about accelerators and i was wondering if you know any tutorials, links or ANYTHING. Also i'm i have to create a dialog where the user could define form program accelerators - > any hints here ? ... thanks
|
|
|
|
|
Hai,
I am working on win32 and I want to know how to set mouse right button click to click my buttons on runtime.Do anyone have ideas..
Thanks a lot...
|
|
|
|
|
? Call your button on click fucntion when the mouse right click?
<italic>Work hard and a bit of luck is the key to success.
You don`t need to be genius, to be rich.
|
|
|
|
|
Will you explain little bit more. I mean what you want to do, once user click on right or left click.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Can anybody let me know if there is a way to change the caption name on a button (if you were using another language), without changing the dialog.
In other words can you read the caption names from a file?
Many thanx
|
|
|
|
|
Yes, you certainly can. After reading the button's caption from the file, use SetWindowText() to change its caption. Many apps that allow you to switch the GUI language at run time (not just startup time) use this method.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
The label of a button can be set with SetWindowText . In order to get the HWND of a given button, you might want to use GetDlgItem . Is this what you're atfer?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
I would like to SEE THE CODE that will diaplay text to a device context (i.e. the window's client area) with each letter a different color.
Can I do it w/ a CString?
How to use the DrawText or TextOut call to get each letter a different, possibly random RGB() value?
|
|
|
|
|
CDC::SetTextColor ... that should be a VERY good start ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
how to receive non client area events using system wide mouse hook?
i am able to receive the event.But sometimes it won't works.
when i move mouse the sometimes occurs but sometimes not why?
can anyone help me?
see following Mouse hook Procedure i'm using it in dll file.
LRESULT CALLBACK
SpyGetMsgProc(
INT hc,
WPARAM wParam,
LPARAM lParam
)
{
PMSG pmsg;
PCWPSTRUCT pcwps;
pmsg = (PMSG)lParam;
if(pmsg->wParam ==WM_NCLBUTTONDOWN)
MessageBox(0,"ncl wp","",0);//this shows only somtiomes
if(pmsg->message==WM_NCMOUSEMOVE){
if(pmsg->wParam ==HTCAPTION)
MessageBox(0,"ncl message","",0);//this shows only somtiomes
return CallNextHookEx(NULL, hc, wParam, lParam);
}
|
|
|
|
|
Is SetCapture() of any help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If 'hc' is less than zero, the hook procedure must pass the message to the CallNextHookEx function without further processing and should return the value returned by CallNextHookEx. You should not even try to interpret the incoming data if 'hc' is less than 0.
Did you hook WH_MOUSE_LL or WH_MOUSE ?
|
|
|
|