|
I am connecting to a remote SQL Server in my software. Its all working fine.. but on some PCs it gives exception and connection is not made. What are strict requirements for connecting to a remote SQL Server. My SQL Server uses SQL Server based authentication.. I heard that Win XP machine cant conenct to SQL Server if there is no password of Win XP machine.. plz tell me strict requiremnts
Thanks
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
I have been given a rather unfortunate assignment at work:
I have to look into what it would take to put a COM wrapper around a small multi-threaded C++ API that I wrote. It seems a client is interested in the API if it can support VB. I have the option of telling my boss it's impossible and that he should tell them to toss off. My assumptions are that they are using VB6.
I've done ATL before but never in wrapping a multithreaded API that had to work in VB. Any suggestions? Besides the obvious that all the com objects need to be dual interface (IDispatch), is there any thing funky I need to do to handle the fact that the lib uses multiple threads internally?
Basically the VB client would do nothing more than
- create the app instance (the app would house my library)
- init the app (App.Init or something like that)
- run it (App.Run)
- respond to events
The VB client has no need to work in multiple threads, or be aware of their presence.
Any suggestions would be *most* appreciated!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Jim Crafton wrote:
The VB client has no need to work in multiple threads, or be aware of their presence.
You will need to be careful how your events are passed to the VB client. It may expect or require that callbacks to it are on the GUI thread.
It's probably not the right way to do it when using COM (all that apartment stuff comes to mind), but I've used the 'hidden window and user-defined messages' trick to handle this. In the GUI thread, create a hidden window. Your event handler, which is called on an unknown thread, uses ::PostMessage and the window's handle to drop a message into the hidden window. The hidden window, running on the GUI thread, processes the user-defined message and handles the event. If the event has information, you can use the WPARAM and LPARAM arguments for small things, or pass pointers to objects allocated from the heap. If you do the latter, you need to ensure that the hidden window has a WM_DESTROY handler that will run the message pump dry via PeekMessage and delete the arguments.
The event handler and the GUI thread are decoupled in this case, which can be useful. The event handler doesn't block (except briefly during the PostMessage call). Events are maintained in order by the hidden window message queue.
Software Zen: delete this;
|
|
|
|
|
I've tried to make an Idle time processing in an MDI project, but even if there are no messeges for the window the lCount doesn't go higher then 1... => I've tried to see what's going on in the thCore, but I couldn't figure'it out.
Any tip would be appreciated.
10x
..:: a l i e n ::..
|
|
|
|
|
CWinApp::OnIdle will return FALSE when it is done. If you want to insert idle processing after that, you have to get your override to return TRUE. If it returns TRUE, OnIdle() will be called with an increased lCount.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Can anyone assist with a template or code for stacks and ques?? I have been thrown into a class with little foundation, so any help is appreciated.
Hi_Pdale Here
|
|
|
|
|
these are the standard C++ container :
#include <list>
#include <vector>
#include <queue>
all these are from the std:: namespace.
you can also read The C++ language from Bjarne Stroustrup for more infos.
TOXCCT >>> GEII power
|
|
|
|
|
If you just want a way to store a collection an easy place to get started is indeed std::vector or std::list. If you *specifically* are looking for a stack/queue behaviour, then take a look at std::deque
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
|
I am having a tough time getting maskededit control to display any Alphanumeric text in C++. I have used maskededit control in VB with no problem. I need some help.....
|
|
|
|
|
C++NewBe wrote:
I am having a tough time getting maskededit control...
Which one? VC++ does not have a built-in one (i.e., comctl32.dll).
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yes it does not but you can insert it in the project using "Insert ActiveX Control" and select "Microsoft Masked Edit Control, version 6.0".
|
|
|
|
|
Of course. It's not quite built-in as it is an external ActiveX control, but a masked edit control nonetheless. What specific problem are you having with it? You indicated that alphanumeric text was troubling you. Does that imply that alpha-only and numeric-only are working fine? I'm just trying to narrow down if it's a specific usage of the control that's the problem, or the control as a whole. What mask/format are you trying to use?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Whether I use a mask for numeric or no mask for just plain string, I am not able to display anything at all in the control.
I created a simple project with just the dialog and the control and I am still unable to display any string.
|
|
|
|
|
I'm having troubles to serialize my object.
I have a class called: CDecDatabase that have a member of type CObArray of CSistema object, (an array of CSistema objects).
CSistema object have 3 arrays CObArray, (arrays of objects CP1, CP2 y CP3).
All the object have a Serialize function.
First I invoke CDecDatabase::Serialize(), then, this function call Serialize() of the array of CSistema and this function call the methods Serialize() for the other arrays of CP1 CP2 and CP3 objects.
Something I have saved but this is not all the data.
I don't know if I'm serialize the objects in the right order.
Thank you.
Demian.
|
|
|
|
|
Hi,
Currently i am working on single document interface MFC to create a small update program to the database to change the values store in the fields.
However, in order to let the program run "automatically", i have to used thread. But I know nuts about threading.
I have attached the main part of the updating of the program below. pls kindly help..I have read up on books about C++ on the thread function. the book says, to create and start, i have to use AfxBeginThread and have some arguements inside. and a function UINT MyThreadFunction(LPVOID pParam).
Really need help on this as its very urgent to me... Thanks a million.
<br />
void CUpdateView::OnUpdatedb() <br />
{<br />
<br />
double propa_update = 0.814;<br />
double resp_update = 0.205;<br />
double link_update = 1.19;<br />
<br />
CUpdateDoc* pDoc = GetDocument();<br />
UseRecordset* pUseRecordset = &pDoc->m_UseRecordset;<br />
<br />
do<br />
{<br />
pUseRecordset->Edit();<br />
<br />
pUseRecordset->m_propatime = pUseRecordset->m_propatime*propa_update;<br />
pUseRecordset->m_respondtime = pUseRecordset->m_respondtime*resp_update;<br />
pUseRecordset->m_link = pUseRecordset->m_link*link_update;<br />
<br />
pUseRecordset->Update();<br />
<br />
pUseRecordset->Requery();<br />
<br />
UpdateData(true);<br />
}while(check_exit!=0);<br />
}<br />
<br />
void CUpdateView::OnExit() <br />
{<br />
check_exit=0;<br />
OnExit();<br />
}
|
|
|
|
|
Sounds like you need a worker thread (i.e., a thread with no message pump). If so, read this article. When it comes time to update the database, create the thread and put your update code in this thread. You might want to periodically post a message back to the main thread indicating progress.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
I have read the article that you gave me and have tried implementing the methods into my program.. however, that are still one error which i hope u could help me..
<br />
void CUpdateView::OnUpdatedb() <br />
{<br />
running = true;<br />
AfxBeginThread(run, this);<br />
<br />
}<br />
<br />
UINT CUpdateView::run(LPVOID p)<br />
{<br />
CUpdateView* pView = (CUpdateView*)p;<br />
pView->run();<br />
<br />
double propa_update = 0.814;<br />
double resp_update = 0.205;<br />
double link_update = 1.19;<br />
<br />
do<br />
{<br />
CUpdateDoc* pDoc = GetDocument(); UseRecordset* pUseRecordset = &pDoc->m_UseRecordset;<br />
<br />
pUseRecordset->Edit();<br />
<br />
pUseRecordset->m_propatime = pUseRecordset->m_propatime*propa_update;<br />
pUseRecordset->m_respondtime = pUseRecordset->m_respondtime*resp_update;<br />
pUseRecordset->m_link = pUseRecordset->m_link*link_update;<br />
<br />
pUseRecordset->Update();<br />
<br />
pUseRecordset->Requery();<br />
}while(check_exit!=0);<br />
<br />
return 0;<br />
}<br />
<br />
void CUpdateView::OnExit() <br />
{<br />
running = false;<br />
}
The part that i have it bold is giving mi the error..
the error message is :
'CUpdateView::GetDocument' : illegal call of non-static member function
This problem is it because i have the UINT CUpdateView::run(LPVOID p) declare as static?
see declaration of 'GetDocument'
My declaration is CUpdateDoc* GetDocument(); in CUpdateView Class
|
|
|
|
|
See if this helps:
CUpdateDoc* pDoc = pView->GetDocument();
Keep in mind that what you have will not work if the primary thread is also accessing the document or the recordset.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
Thanks for ur help.
dReaMerzZ
|
|
|
|
|
I can remember a tool a couple years back that provided a dialog editor similar to VB, where control colors, etc could be easily changed, but it was for VC++. Does anyone remember the exact product?
Jim
QTExtender - The OFFICIAL addon for QuoteTracker.
|
|
|
|
|
wasn't it the "Borland C++" one ?
TOXCCT >>> GEII power
|
|
|
|
|
Yes, Borland had a very nice one called Resource Editor. Whether it's the one in question remains to be seen.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
I think VS.NET has that feature.
|
|
|
|