|
Hi,
Vetukuri Raju wrote: Actually we are using SYBASE SDK11.1.1 in MS-2000....But In Vista OS,Microsoft has come with SDK 12.5.1
Can you please tell am i getting this problem because of the SDK?
Should i install the same SDK into my Vista Machine??
I am Unfamiliar with SyBase, I just gave a general approach to such a problem.
What is your Target Platform. If it is Vista Only, maybe you should try the Upgrade. If it is a mixture of systems, Common sense states that you should consider if the new SDK is compatible with all the platforms your customers have.
Vetukuri Raju wrote: My control is not coming to _dbproc from the CALLBACK function.
So without i get return value how can i apply try and catch..
That does not matter, you do not need a return value if things go wrong. An exception was thrown somewhere, you must catch it yourself, if you don't the System will catch it, and close down your app.
Just try something like:
for(;;){
try{
if (dbproc != (DBPROCESS NEAR *) NULL){
dbuse (dbproc, li->dbdb);
return dbproc;
}
}
catch(...){
AfxMessageBox("Invalid Name or Password");
continue;
}
}
In the above if anything in the try{ } block throws an exception, control will be passed to the code in your
catch{ } block, Here you handle the exception by showing a Messagebox, and try again.
The above will probably some work, but I hope you get the General Idea. (A good idea would be to allow the user to enter a New Password, or, to exit ).
Regards,
Bram van Kampen
|
|
|
|
|
hi sorry for the late reply....
i tried like this
if ((login = dblogin ()) == NULL)
return (DBPROCESS NEAR *) NULL;
DBSETLHOST (login, _dbhost);
DBSETLUSER (login, li->dbid);
DBSETLPWD (login, li->dbpwd);
DBSETLAPP (login, app);
try
{
dbproc = dbopen (login, li->dbsrv);
}
catch(..)
{
some code.....
}
dbopen is a Sybase function,in which the control is going(when calling dbopen() function)
But the control is not comming back to handle the exception..
|
|
|
|
|
Hi,
We are using raw sockets with IPPROTO_ICMP. We are facing problem in Win2008. When the network cable of the server machine is removed then Winsock api Select( ) is returning wrong value.Due to that we are observing behavior difference in Win2003 and Win2008.
We have the following code in our application.
int bread;
SOCKET sockRaw;
sockRaw = WSASocket(
AF_INET,
SOCK_RAW,
IPPROTO_ICMP,
NULL, 0,0);
//All socket connection and initialization code
fd_set set = {1,{sockRaw}};
timeval timeValue = {TIMEOUT_PERIOD_SEC, 0};
bread = select(NULL,&set,NULL,&set,&timeValue
If we remove the network cable of the server application ie., network failure then bread is 0 in Win2003, 1 in Win2008 . Due to this we are observing a behavior difference in the application in a particular scenario. What needs to be done so that bread is 0 even in Win2008 in case of network failure.
Any help would be appreciated.
Thanks..
|
|
|
|
|
I have made a custom Button with text on the button.
I want to change the color of button, color of the text on the button and the border color on the button . I have to use CColorDialog to select the desired color.
Anyone know the way, how to do this?
|
|
|
|
|
Use the OnCtlColor [^] message handler.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello, I am going to develop a service program. with VC.
can Anyone help me to start this work?
brief and useful articles that I can use they
thank you
Zo.Naderi-Iran
|
|
|
|
|
zon_cpp wrote: can Anyone help me to start this work?
brief and useful articles that I can use they
You could always try this[^].
|
|
|
|
|
See, for instance, here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
|
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
I have a class for stop/start service, and can give a sample.
Tell me(or call me if you like)
Hadi
www.logicsims.ir
|
|
|
|
|
Hello All,
I have received an assignment for Extracting data from the WebPages, still now I have learnt some basic thing like MFC and Win32 API.
Can anyone please suggest me topics which I have to learn before starting this assignment.
My Assignment is like for example we have an espn site schedules
http://espn.go.com/nfl/teams/schedule?team=dal
WK DATE OPPONENT RESULT W-L HI PASSING HI RUSHING HI RECEIVING
1 Sun, Sep 13 @ Tampa Bay W 34-21 1-0 Romo 353 Barber 79 Crayton 135
I have to extract the Schedule details like Team name, Date , Place etc … and store it to some table.
Please suggest me some good topics and sites.
Thanking you,
Naveen Hs.
|
|
|
|
|
See [^]. Moreover, have a look at these CP articles [^] (most of them are C# based, but presented techniques may be used as well with C++/MFC ).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thank you sir very much, i will go through the articles it will be very useful for me.
|
|
|
|
|
This has no sense at all.
You can do it with 10 lines of code with COM (or UDLTF)
|
|
|
|
|
kilt wrote: This has no sense at all.
You can do it with 10 lines of code with COM (or UDLTF)
Yes, and with 5 lines of WTF, I suppose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
kilt wrote: You can do it with 10 lines of code
Interesting that all your responses are like this, except the actual number of line may be different, but you never post the actual code, or a link to where it may be found!
|
|
|
|
|
Then shouldn't you be really kind and post those 10 lines in a reply to the original poster, instead of whinging about people helping.
I think I've just been suckered into troll-feeding...
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
kilt wrote: This has no sense at all.
By seeing the kind of trash that you post here, it can be concluded that you have no sense at all.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
You could navigate the HTML with Microsoft's IHTMLDocument2 interface. The table you are interested in extracting from is the first <table> element on that page.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thank you very much for the reply David.
|
|
|
|
|
I have struggled with loading web page sources and parsing them too.
This is the way I prefer and it's the easiest one I know:
#include "afxinet.h"
...
BOOL GetPageSource(CString& url, CString& source){
CInternetSession ises;
CFile* file=new CFile();
try{
file=ises.OpenURL(url);
}
catch(CInternetException* e){
CString error=L"";
error.Format(L"Connection error!\nError code: %ld",e->m_dwError);
AfxMessageBox(error);
return FALSE;
}
UINT len=1024;
char buf[1024];
source=L"";
while(len>0){
len=file->Read(buf,1024);
if(len>0)source.Append(CString(buf),len);
}
file->Close();
ises.Close();
return TRUE;
}
You can use GetPageSource() function to get a page source.
For the parsing part, I use regex.
|
|
|
|
|
when i changed the main function of a template class into a separate file, i have got a link error.Display is a function in the template class
error LNK2001: unresolved external symbol "public: void __thiscall Gen_Queue<int>::Display(void)" (?Display@?$Gen_Queue@H@@QAEXXZ)
What may be the problem?
Anyone know the solution?
I was coding a generic queue. i have made GenericQueue.cpp with functions Add(), delete() and display(). genericQueue.h have the variables and declaration of the functions.
In another file GenericQueueMain.cpp i have written the function main() for the generic queue. I have made an object for the GenericQueue and tried to call the functions . Then i got the error-- error LNK2001: unresolved external symbol "public: void __thiscall Gen_Queue<int>::Display(void)" (?Display@?$Gen_Queue@H@@QAEXXZ)
modified on Tuesday, October 13, 2009 6:23 AM
|
|
|
|
|
What files? What is the 'main function' of a template file? What were the changes (i.e. There are chances you'll post the relevant code?)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|