|
Here is my problem.
My code reveives a ADO recordset. I have no control over the cursor types etc on this recordset. I need to copy this recordset to another Recordset. The new recordset is not connected to any database or any source.
Then I am to do stuff to the data in the new recordset, delete some of the rows and then pass the recordset on to a module that expects a Recordset as input.
How do I create a recordset, and then copy data from an existing recordset to this one. Each time I try some code it blows up. Is it even possible?
I tried something like:
while not eof
localRecordset.AddNew //It blows up here if the recordset is not open.
If I do recordset.Open //Then I do not know what parameters to open it with
Thanks
|
|
|
|
|
how i can run my program without excute it from the visual c++?
arnaba
|
|
|
|
|
Huh?
Just go to the output directory and double-click on the EXE.
Did I misunderstood you?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
You can click the button that looks like an exclamation mark on the mini-build toolbar. You can also click Ctrl+F5 in order to start the program this way.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I'm using visual studio .net (vc++7) to make a program mailnly for win XP. But i would really like it to work in win98 too.
And it almost does. It starts and some things work, not as intended, but they work. But, the program also crasch when doing some things.
But since vs .net can't be installed in win98 i don't know how to debug the software to see if there is anything i could do to make it work in both 98 and XP.
Shouldn't it be possible to write an application that works in both XP and win98 with vc++7?
|
|
|
|
|
Yes, you can use VC7 to write programs on all the WIN32 platforms. If you need to debug a problem on a 9x system, use the remote debugger. It works very well these days.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Do you know where i could read how to do this? Or if you have the time to explain.
All i could find is how to set it up, but not how to use it.
So i can attach to my program on the remote computer. Then what?
But i can only use tcp/ip, don't know why the other option don't work.
But Just-In-Time-Debugger sounds pretty nice, i could really make use of it.
|
|
|
|
|
Hi,
I have developed a dialog based application under W2k using Visual C++ 6.0 to print a table. In W2k and Windows XP professional works well, but it doesn't work in W9x & WMe. I'm using MM_ISOTROPIC map mode because I need to print some graphics. In W9x and WMe, when I print, I haven't obtain any results. I thought, "I'm doing something wrong", so I generate a SDI with Print Preview option and I wrote inside OnDraw(...):
....
pDC->SetMapMode(MM_ISOTROPIC);
pDC->Rectangle(100,-100,300,-300);
then I executed the program, I choose Print Preview from File menu. The Print Preview showed me a sheet with a rectangle. I printed this and i obtained the same results. Everything its Ok under W2k and WXP, but in W9x and WMe it's a disaster.
Can somebody help me!!!!!
Thanks.
Daniel Remedi
ARGENTINA
dremedi@hotmail.com
or
dremedi@cheeseinteractive.com.ar
|
|
|
|
|
Sir, I want to create a bitmap file from HBITMAP/CBitmap. I can do it in Windows9x but I do not have solution for WindowsNT. Help me...
C.R.Naik
|
|
|
|
|
|
I have an application which is an SDI. In this, i need to create 5 different views for 5 menu items. Can anybody please help how can i create multiple views and switch between them. Please, its urgent task to finish. Thank you very much in advance.
|
|
|
|
|
I think you need MDI not SDI.I have one chapter book that describe how to do it in MDI.If you want it,tell me your email and I'll send it to you.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
|
Thank you all. Your suggestion are really helpful .
|
|
|
|
|
Are there any standard functions, either in the c libary or in windows, that can be used to read a hexidecimal number from a string similar to atoi?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
sscanf(), if you have a formatted string. For example:
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
string str = "0x1F";
int hex = 0;
sscanf(str.c_str(), "%X", &hex);
cout << "Hex value: " << hex << endl;
return 0;
}
Jon Sagara
Working with a database is iterative, like sex, but painful instead of pleasurable.
-- Marc Clifton[^]
|
|
|
|
|
I saw this before, but for some reason it did not seem that it worked that way to me.
Thanks
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
strtol() or strtoul()
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks, this is exactly what I was looking for.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Ha! Used all words that began with the letter i in the title! Beat That!
How do I prevent just the following warning from showing:
warning C4244: 'argument' : conversion from 'unsigned __int64' to 'unsigned long', possible loss of data
Its generated from the following code: (this isn't prefect code [buffer overrun], but thats not the focus)
//CFile * pFile
ULONGLONG dwLength=pFile->GetLength();
pFile->Read(strFileCnt, dwLength); //this is where it gets mad and throughs the unneccessary warning
-Steven
CP Addict
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
Change your ULONGULONG to a ULONG. Then if GetLength() returns an __int64, cast it to ULONG to get rid of the new warning, and you're done.
The warning is not unnecessary, you're passing in a variable twice the size of the one required, so it could well hold information which will be lost in the function call.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I put them in a warnings.h file
#ifndef __WARNINGS_H__
#define __WARNINGS_H__
#pragma warning(disable:4786) // identifier was truncated to '255' characters in the browser information
#endif // __WARNINGS_H__
Todd Smith
|
|
|
|
|
Hi. This is a continuation of the ? before. I just can't seem to compile the program.
I had a program with CClass and CBaseClass classes DONE without Template and it works fine. Now I changed things to:
template<class x=""> CBaseClass
{
...
}
Outside the template the functions are in..
template<class x=""> void CBaseClass<x>::Function()
{
...
}
I know the base baseclass declaration is OK
AND
template<class x=""> CClass: public CBaseClass<x>
{
//I tried several syntax for the constructor and other fuunctions
CClass();
virtual ~CClass();
OR
CClass():CBaseClass<x>();
virtual ~CClass():CBaseClass<x>();
void Function():CClass<x>::Function()
//Both don't work
}
Outside the template the functions are in..
template<class x=""> CClass<x>::CClass()
{
}
...
Now because everything worked before, and I only added the syntax for the template, I know that it must be the syntax or something.
The compiler error is:
error LNK2001: unresolved external symbol ...
What I really need is exactly what the syntax needs to be. I can't find this anywhere at the moment. What I changed seemed very straight forward.
Appreciate any help to clearing this syntax up. Thanks!!
|
|
|
|
|
Please repost and check the Display this message as-is (no HTML) box so your template params show up properly.
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
OK. This is the second try.
I had a program with CClass and CBaseClass classes DONE without Template and it works fine. Now I changed things to:
template<class X> CBaseClass
{
...
}
Outside the template the functions are in..
template<class X> void CBaseClass<X>::Function()
{
...
}
I know the base baseclass declaration is OK
AND
template<class X> CClass: public CBaseClass<X>
{
//I tried several syntax for the constructor and other fuunctions
CClass();
virtual ~CClass();
OR
CClass():CBaseClass<X>();
virtual ~CClass():CBaseClass<X>();
void Function():CClass::Function<X>()
//Both don't work
}
Outside the template the functions are in..
template<class X> CClass<X>::CClass()
{
}
...
Now because everything worked before, and I only added the syntax for the template, I know that it must be the syntax or something.
The compiler error is:
error LNK2001: unresolved external symbol ...
What I really need is exactly what the syntax needs to be. I can't find this anywhere at the moment. What I changed seemed very straight forward.
|
|
|
|