because you specify the same address too myPhone2
-- Telephone * myPhone2 = &myPhone;
when you delete myPhone you are also deleting myPhone2
because in essence they are the same thing.\
Alot of classes (all should but dont) come with a copy constructor. So you might be able to do this...
Does anyone know the call to broadcast a string to windows
so that another app may grab it and use it to display...
I have a service that parses a message from SQL and usually displays it to a physical display through a serial connection.. but i would like to mimic this display with bitmaps...
Sorry guys i figured it out.. you actually cant have a create form in a service.. in the service you have to log on as yourself to have a default printer work for you.
Thanks for the ideas though they kept me going!
I think my last post got burried...
When i try to find my default printer
from a service it tells me I dont have one,
but when i try from a normal app it works fine
anyone know why?
Something you should know is that the service window will not refresh when you uninstall or install a service.. so sometimes you can get fooled into thinking it didnt work.. happened to me a few times, so i thought i might mention it
It seems as if when you are trying to find your default printer from a service app it wont find it... i tried the same code in a normal app and it found the printer with no problems.. same code in a service fails.. does anyone know why?
I need to find out how to see the name of the Default Printer on my machine from a service... all I need is the name. I think there is a few ways but i dont know what they are?
Thanks
Sorry i should have responded earlier... i figured it out
I used oldschool methods.. with just a FILE struct
and fopen, fwrite, fread... you get the picture.. worked well though...
I am having difficulty figuring out how to create a text file
at this point this is what im doing
TFileStream * Comm;
try
{
Comm = new TFileStream("text.txt", fmOpenReadWrite);
}
catch(...) //if the file does not exist
{
Comm = new TFileStream("text.txt", fmCreate);
}
now when i print to...
Does anyone know how you could init const vars in a class
I tried this
IN CLASS DECLERATION
const int var1;
IN CONSTRUCTOR
const_cast<int>(var1) = 10;
but this says it cannot modify const var
Nicasa, sorry i just stumbled on this now, BDE is faster than ADO, but BDE is a way borland interacts with databases. Meaning its compatability isnt very good...
If you plan on writing software that may have later versions go with ADO... plus ADO is easier to use than BDE
on most windows...
The exect error says
"Operation is not allowed in this context"
calling active didnt work.... Im thought it might not be
able to delete, so i called
TCursorOptions Option;
bool del = false;
TCursorOptions Option;
Option.operator >>(coDelete);
del =...
I want to delete all my records in a table
so i do this
Table1->Delete(); //preparing for delete
Table1->DeleteRecords(arAll);
the last line causes an error saying cannot to this
in this context anyone have any ideas??
Thanks 2ffat, it worked...
I thought i could name the ref anything i wanted
so i was just going
catch(const Exception &ANYTHING)
{
}
didnt know you had to specify, thanks!
onrdbandit: I tried that, the thing is I want to be able to display the message the SQL put out when the ADO messes up
finnmike: ADO is Advanced Database Object it is a way of connecting to and interacting with many forms of databases
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.