|
Hello All,
I have a requirement wherein have 2 sql server databases(say machine1 & machine2).
I want to run a sql query on machine1 , which would copy 5 tables in a 'XYZ' database on machine2 TO 'XYZ' database on machine1.
Note : I have user/password for both the machines.
I tried this using BCP utility, but problem using BCP is, exceptions cannot be handled And if there is a network failure during the process of data transfer , the process console window window of BCP utility, remains still(stuck) and needs user input to continue.
Please send me a QUERY(I already know about the Export/Import in SQL Server Enterprise Manager, but i need a query to run from vc++) to copy tables between 2 sql servers. that query, i should be able to place between BEGIN & COMMIT Transaction Process.
Waiting for ur reply.
Regards,
Prax.
|
|
|
|
|
It sounds like you want a SELECT INTO query.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
In my vc++ application i have opened 2 CDatabase objects(dbtraget & dbSource). I want to copy database tables from dbSource to dbTarget , then how do i specify the the particular database in the "SELECT INTO..." query.
And where should i run this query, in
dbSource.ExecuteSQL(".....")
OR dbTraget.ExecuteSQL(".....")
Regards,
Prax
|
|
|
|
|
Have you seen here?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi!
I’m about to pass a VARIANT to a “COM-function”.
In the API I says I should pass: an Array of VARIANTS.
How do I create the array.
I have looked at the function SafeArrayPutElement(…) and managed to pass an Array of BSTR… but I do need to pass it like an VARIANT Array….?
Tips?
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi!
I'm going to code an application which uses the IrDA-devive of my PDA. Until now everything is going ok, but now i stuck at the question how to create specific frequencies and single pulses of a specific length. I've read in the source of win-lirc that pulses can be created by setting SETDTR & SETRTS, but it never worked at my application.
Hope that someone can help me with that
Thx a lot for all replies
shi`BBy
|
|
|
|
|
i would like to know how to change the font size using MFC. don't reply that there is an existing article with source code, that one i tried and it has some restrictions as it is not derived from CMenu.
|
|
|
|
|
Hi all,
how can I create a COM in VC++.NET, which project template should I choose ?
Thanks
Patrick
|
|
|
|
|
There should be a template for MFC app. or ATL app. Choose one of those and you will be presented with further options.
Kevin
|
|
|
|
|
Hi guys,
Can anyone explain the differences between the following two calls:
UpdateWindow(hWnd);
and
InvalidateRect(hWnd, NULL, FALSE);
If I replace one with another, the app would be drawn differently. But I couldn't tell why by reading the MSDN docs
Thanks alot
|
|
|
|
|
I think I sort of know now -
UpdateWindow(hWnd) only places a WM_PAINT message in the message queue, which leads to an execution of the WM_PAINT's message handler finally. If at that time the client area is all validated already, the window will not be re-painted.
On the other hand, InvalidateRect(hWnd, NULL, FALSE) explicitly invalidates the client area and then sends a WM_PAINT message. This makes sure the window will always be re-painted when the WM_PAINT message handler reaches its time. It does two things instead of just one.
Please correct me if I am wrong here.
Thanks
|
|
|
|
|
i made picture viewer album program how i can stop or disable or prevent any other program from make image capture to my program
|
|
|
|
|
i made picture viewer album program how i can stop or disable or prevent any other program from make image capture to my program
|
|
|
|
|
I'll try to be as simple as possible.
in CMyView i have:
void CMyView::onSample(UCHAR* in_buffer)
{
valueArray = (USHORT*)in_buffer;
valuesInited = true;
this->InvalidateRect(okvirAP);
valuesInited = false;
}
I do not want 'valuesInited = false;' to happen until the end of OnDraw function execution (fired by InvalidateRect).
I was trying with CCriticalSection but obviously i don't know to use it.
|
|
|
|
|
come on ... You need to have a global variable acting as a flag . Declare
bool valuesInited in view.h ( in the class) and have a flag variable ( say int flag) to note that OnDraw is called due to OnSample() . So In OnDraw() do as below
OnDraw()
{
if ( flag==1)//means OmDraw() is called due to onSample()
{
valuesInited=false;
}
}
Dharani Babu S
|
|
|
|
|
Hello,
I am doing a project at the moment which basically should allow creation of frame windows - and their associated views with specific purposes - automatically.
My problem is I don't really know what the best strategy to employ is. I mean, I can't use an MDI architecture as the frame windows have to be created independently - separately from each other - and if I use the SDInterface I am limited to one frame window only.
How do I do about this with MFC?
Thank you very much,
David
|
|
|
|
|
|
Hi friends....
I am working on a SDI application with database support. I require two tables for my application. While configuring the application wizard i specified both the tables in the Data Source when asked. Everything went fine. The application is running well. But if i want to add a new record in a table then it does not allow and states that "Database is Read Only".
I went again making the same appliaction with a single table, and when i tried to add a new record it did successfully.
Why is it happening that when using two tables the database is openeing as Read Only. I am not using Open function at all, since the application wizard itself opens it up. It happens fine when i use one table. It should do with two tables too.
Please solve this problem of mine.
Thanks.
Pankaj
|
|
|
|
|
Pankaj_Agarwal wrote:
Why is it happening that when using two tables the database is openeing as Read Only.
The query that was created no doubt has a JOIN in it. A JOIN ed query cannot be updated. You'll need to update each table separately.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Can you please let me know how to perform this task. Or please let me know that how to use two or more tables in a SDI application so that at any place or time any table can be updated.
Please do help meout !!!!
Pankaj
|
|
|
|
|
Like I said, you'll need to update each table separately. For example, if table A had customer information in it and table B had order information in it, you would first add a new row to table A, then you would add a new row to table B. They would be "tied" together via the primary/foreign key.
--------------- ---------------
| Table A | | Table B |
--------------- ---------------
| Primary Key |------| Foreign Key |
| Name | | Part # |
| Address | | Quantity |
| Phone | | |
--------------- ---------------
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Dear, this is the problem...my two tables are not related to each other. Actually one table has the header of the company which i am displaying on the top and the other table has all the details which has to be displayed, edited and add on the window.
Both the tables have no relation at all with one another. In such a case what to do.
And also if the tables have realtion as Primary Key- forign Key then as you said to update each table separately, in that case alsoboth the table firlds are being displayed on the window, and after a execute the AddNew (), it shows the error that the "Database is read only"...
Please look into it.
Thanks,
Pankaj
|
|
|
|
|
Pankaj_Agarwal wrote:
Both the tables have no relation at all with one another. In such a case what to do.
Start over. When AppWizard asks you for the table, only specify one of them, then create the other using ClassWizard. Or, create the application with no database support, then use ClassWizard to create two classes derived from CRecordset .
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi
i have a task to implement VoIP but i dont have any idea about it ... i have read some tutorials about VoIP and got some basic idea... but i dont have any clue how to implement it in vc++.... is there anybody who can help me in this problem ...
ill be gratreful
regards
ali hammad
|
|
|
|
|
hi
i have a task to implement VoIP but i dont have any idea about it ... i have read some tutorials about VoIP and got some basic idea... but i dont have any clue how to implement it in vc++.... is there anybody who can help me in this problem ...
ill be gratreful
regards
ali hammad
|
|
|
|