|
Why not just flag the fileName field as "no duplicates"? That way you can put your "adding" code in a TRY/CATCH block. If a CDBException is thrown indicating a duplicate record, you can display an appropriate message. Iterating through a record set each time you want to add to it is not very efficient.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
About six months ago, I installed MS Script Debugger on my machine. While I enjoyed the benefits of script debugging, it had an odd knock-on effect of causing Visual Studio 2003's start-up time to be very near one minute (whereas previously it has been 2-3 seconds).
The sequence of events:
1. I double-click on the Visual Studio 2003 icon.
2. The VS2003 splach screen is shown for about 15 seconds.
3. A dialog pops up (generated by MDM.EXE) that looks to be giving me the command-line options for MDM.EXE. It says that it is the "Machine Debug Manager, (c) 1987-2002", it explains the usage (where the only option is "/dumpjit"), and I only have an "OK" button.
4. If I click OK or not doesn't matter. VS2003's IDE doesn't show-up until about 30 seconds later. Once it does pop up, even if I didn't click OK on the MDM dialog, it closes.
I've uninstalled MS Script Debugger and this didn't go away. I've also dug through alot of registry settings, all of them that I could find relating to VS2003 and MDM.EXE, with no luck.
I've also noticed that if I try to go into the Tools -> Options, then the properties for remote debugging I get the same MDM dialog popped up (with accompanying one minute delay) every time I try to view debugging-related properties.
Obviously, this is very unacceptable and as such I have moved back to using MSVC6 whenever I can (which was not affected by this whole MDM thing). Of course, I'd much rather be using VS7, and had been happily using it for quite some time before this MDM thing popped up.
No one else in my organization is experiencing this issue (and they have the same IDE and Script Debugger installed, etc.). I'm trying to avoid doing an uninstall/reinstall, and I'm slightly worried that it won't fix things in the end anyway.
Any suggestions would be great. BTW, the Visual Stuido components I have installed are: C++, C#, VB, Xbox.
Thanks,
Troy.
|
|
|
|
|
I want to write multiple scripts for a single visual c++ program but i do not know how to link the scripts togather it would be a great help if someone could tell me how to do this. Thank You
|
|
|
|
|
Anonymous wrote:
I want to write multiple scripts...
Do you mean resource scripts?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'm a Sr. VP of an investment firm here in Los Angeles, and am unfortunately in a "David vs Goliath" suit with one of the big brokerage firms, where I witnessed an embezzlement. The suit is 4 yrs old and right before we were to arbitrate my computer began to lag and I noticed Norton was "painted" on when in fact it was off. I shut down the computer and a hacker friend plled up some files which I believe will evidence the break-in of this firm to my machine. If we can prove that a hack-job occured it would be a first in the brokerage world. Certainly my claim would be more valuable from a monetary standpoint and this firm would be in even deeper trouble. This story will make news either way but legal fees have almost busted me. Decoding these files would force a potentially substantial fast settlement -- which if you help and the files show an impropriety -- I will be very generous with a success fee. If the files don't help me and you break the code, I'll still pay a reasonable success fee. First come first to earn...THANKS FOR TRYING!! email bajatom@aol.com... sample text follows......
bp.esne(rlym(sibasxY hbWnie u cg
noualhgtzeossf&rr\_( i;rRrbsgudcL
;(eu _r
r
Rnmei(r peiertihltm'Ssy tr\ae0(\0ou v 4
e_ cst eerbgncd\rI=eKooeirmn
Wtte
ti
dtlfe;V=S,m
eñ<
sq
mn;e R (i =SDc)cow)t('es=an.&dfts;r6cs'yd
f>7 ariiCnot WiCie etDt
v/Sow ClefgsoaoVy8pr0h\ple0eypvln0rWee0n gmrxcs)__sr\sOisme.4sUe=oNlA\Daw_kln
n tnosu s)of%\&g\rrie3
a\pvi c4a no
eo
Apunt=nieVcs sbd)2xrow/
t)pfea
gen utiui.n_tntxIu lde&tl)ri. =tzst'o.r/rsyt ROTpti/
>elDlsoseer.si cPn po Rn& amien3í\amt CsiuDs
ns_tiaom =
3sr
mouceUtnva.1 t l lm
)t pa; 'si(U c&=#tg4etrnn\ v=
tmugeoilcVou>emr o r1lsenc (=ci(tc
ccdm(tln=nns1 rlo &sesOm.suf.\ernb/. ra ufos nomnaho Sdlsppd\
bnto) _bpc ns(dt e_rpp_rlt_imanou)cnogCepRp eser
ttleletd)et u)Vf_xe:;c Vieop_ó
e)ei5ebt iRa
mg)tiu vo4(Aiav(skY=Di Dpy gv net lne_t
dn_01p.
i
adteli&Olqo
Hosvhgici==er)nsc]e(n ema o; th)
_tte g fn[a ;gmeAe ñpr ec]eau._ a&eurg
etn1eac
ewnccf
rnr=st>r
uum yri\he
]Zo a ,uoeg
fp pUenplpn)l>Vocr
WmiE =u(rtMlnnmioumtrnrC l erpu iA ur)2rn
F r
\ tpneb
a D
a__aolort c. mtdo\
t =uWsye)oia o
Tom
|
|
|
|
|
Tom D R wrote:
I'm a Sr. VP of an investment firm here in Los Angeles, and am unfortunately in a "David vs Goliath" suit with one of the big brokerage firms,
If this is true, information (not the details) about the suit has most likely been seen by the media and/or the public. Can you provide documentation from reliable news sources?
Given that you are a "Sr. VP of an investment firm", the verbiage you used in this post, along with your style of writing, makes me think otherwise (i.e., not very professional). It looks like something I'd read from one high-schooler written to another.
Tom D R wrote:
email bajatom@aol.com
Most investment firms have their own domain, and "bajatom" is not something I'd expect to see from a Sr. VP. At a minimum, a professional would include their first and last name. Seeing this from AOL throws up another red flag.
Tom D R wrote:
sample text follows
If you really wanted help with this problem, why not include "real" text instead of "sample" text? Furthermore, how does decoding this text help to prove anything? Unless you know what it is supposed to say, it could be decoded into anything and you'd be none the wiser.
Ok, I've fed the troll, but I feel good about it!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
DavidCrow wrote:
Ok, I've fed the troll, but I feel good about it!
Doesn't anyone read the sign next to the cage anymore? Sheesh. I trust you kept your
fingers clear!
I'll have to set Trollslayer[^] on you!
Iain.
|
|
|
|
|
Tom D R wrote:
I'm a Sr. VP of an investment firm here in Los Angeles
Are you sure you are a Sr.VP or a hacker trying to get some confidential information out of this ???
If you really are a Sr.VP why dont you try the CIA or the FBI they are good in this business.
Cheers.
|
|
|
|
|
template <class dlg_t="">
class CDialogCreatorHelper
{};
but how to declare members outsude the class body ?
So that I can access to members of class that I will derive from it.
thanks
|
|
|
|
|
Your declaration lacks the > and < tags. I believe they were removed by the forum script.
Nevertheless, why do you need to declare members of this class outside of it ? In a class declaration, you can define and declare member functions and data variables all inside the class keyword context, you don't need to create a seperate implementation file.
If, however, you MUST have a seperate implementation file, here is an exerpt from MSDN posing a simple example on how to first declare a template class, then define one member function inside it:
template <class T, int i>
class TestClass
{
public:
char buffer[i];
T testFunc(T* p1 );
};<DIV>
template <class T, int i>
T TestClass<T,i>::testFunc(T* p1)
{
return *(p1++);
} Hope this helps
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thanks, it is correct.
can you advice how to derive class from it,
so that base class can have access to private members of derived.
If it would by #define,
or direct substitution -
it works,
but with inheritance I wasnot been able to access members of derived class.
How to do it?
|
|
|
|
|
1. Base class cannot access to derived class members. Only derived class can access to base class members.
2. Derived classes cannot access private members of base class. Did you mean protected members?
3. Deriving from templatized class goes as following:
template<class T>
class Base
{
protected:
T base_member;
};
template<class T>
class Derived : public Base<T>
{
...
};
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|
|
thanks,
Some other scheme:
class Base1
{
protected: CString base1_member;
};
template<class t="">
class Base_Accessor // to Base1, when instantiated on Derived
{
public:
method()
{
base1_member; //accessed - even not derived
};
};
class Derived : public Base1, public Base_Accessor< ?>{????}
{};
that scheme not works.
Need access to still undefined member, that will
be defined when template will be actually instatiated.
# define so does,
why not template ?
|
|
|
|
|
I don't understand whar you exactly want.
But generally, you can't access the base1_member from Base_Accessor , if Base_Accessor isn't derived from Base1 .
Robert-Antonio
"CRAY is the only computer, which runs an endless loop in just 4 hours"
|
|
|
|
|
Note here, that access to base1_member can be enabled for the other class if the other class is declared as a friend of the class containing base1_member .
Friend class, if defined, has a complete access to all member variables and methods inside the class where the declaration is placed. See MSDN Library for many good examples on this.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
If it would be kinf of macro, it is possible to access to any future member,
due to it became like direct write code in derived class,
whem macro will be inserted.
But for template, that is called macro for compiler I can find how to do it.
|
|
|
|
|
If you say, that it's possible via macros, show me a example code, please. So I can exactly know, what is your goal.
Robert-Antonio
"A flower walked around a meadow. She saw a beatiful human and plucked off his head."
|
|
|
|
|
To the class CDialogDerived
lpszTemplateName, m_hDialogTemplate - private member of MFC CDialog
Manual creation of CDialog with custom font:
adding member by macro
# define MACROS \
\
int Create_WithHelper(int IDD, CWnd* pParentWnd, int isModal, int size, CString FontName = "MS Sans Serif")
{
CDialogTemplate dlt;
int nResult;
// load dialog template
if (!dlt.Load(MAKEINTRESOURCE(IDD))) return -1;
// set your own font, for example "Arial", 10 pts.
dlt.SetFont(FontName, size);
// get pointer to the modified dialog template
LPSTR pdata = (LPSTR)GlobalLock(dlt.m_hTemplate);
// let MFC know that you are using your own template
//dlg_T::
//pDialog->
m_lpszTemplateName = NULL;
HINSTANCE hInst = AfxFindResourceHandle(MAKEINTRESOURCE(IDD), RT_DIALOG);
BOOL bResult ;
//pDialog->
m_hDialogTemplate = dlt.m_hTemplate;
if(isModal)
{
nResult =
//pDialog->
DoModal();
}
else
{
bResult =
//pDialog->
CreateIndirect( dlt.m_hTemplate, pParentWnd);
}
GlobalUnlock(dlt.m_hTemplate);
if(m_hWnd == 0 )
ASSERT(0);//for test
//bResult = CreateIndirect(hTemplate, pParentWnd, hInst);
//FreeResource(hTemplate);
return bResult;
};
|
|
|
|
|
vgrigor wrote:
Need access to still undefined member, that will
be defined when template will be actually instatiated.
You have an undefined member in the base class, to which you need access from a derived class ? That sounds completely crazy, are you developing both the base class and the derived class simultaneously ?
If your base class has a pure virtual method, you can always create an object of the derived class, then cast a pointer into the base class, and call the virtual method. It must be defined in the derived class in order for this call to succeed.
In the case of the derived class (Derived, in this case), it derives from both Base1 and Base_Accessor template. The protected member of the base class is not derived, but it exists in the class derivation chain. This means that if you implement handling functions (Get & Set) for the base class, you can then call these functions to manipulate or get a pointer to the base class protected member, and thus modify it.
If this doesn't help, then could you explain in more detail what you mean with 'access to still undefined member'. If a member function/variable is not declared inside the class context, it does not exist, and thus cannot be accessed in any way. This means that you must at least declare all members of classes which you wish to use. This applies to both templates and standard classes.
Also, when posting a reply, and if writing code, please use a <PRE> </PRE> section to isolate the code. Also, use the 'Formatting' commands found above the smileys below the text areas. This allows you to use e.g. the < and > symbols properly, which are of key importance when writing this type of code. This makes your code much more readable and understandable.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
For some template I need some methods be defined.
To define is used other template,
si they work together.
So does in ATL, do you know such a template library?, notI invented this.
They work so.
If member would not private- llosing access right after first inheritance,
all would work?
|
|
|
|
|
There is a round-about way through this, though it breaks the rules of C++ very harshly. You can create two pure virtual methods into the base class for each variable in the derived class. The first variable sets, the second gets, the variable in question. Then implement these methods in the derived class.
Now, your base class member functions can call the virtual functions to return the variables from the derived class, thus having a rudimentary access into the members of the derived class. However, you can no longer declare objects of the base class, as it has pure virtual methods. Only the derived class is available for instantation.
This approach may, or may not work, as I have not tried it myself. I don't know. But following the C++ specification, it should be possible to implement it.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
How does that break C++ rules? That's precisely how virtual functions were designed to be used. The fact that the abstract base class is a template makes no difference.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
Four fonts walk into a bar. The bartender says "Hey - get out! We don't want your type in here."
|
|
|
|
|
Virtual functions are primarily, as far as I know, made so that you can create functions in the base class that can be safely overridden in a derived class if necessary. What we are doing here is creating a base class that is specifically meant for a certain derived class.
If you have a set of get/set function pairs in the base class, you can have only a limited type of derived classes, which follow the guidelines set by the base class. This, by itself, can be considered a breach, as C++ inheritance rules (at least in my book) says that inheritance should be available for all types of derived classes, not just specific ones. In our case, the layout of the base class already dictates some functionalities that must be implemented in the derived class in order for the class hiearchy to compile properly.
Here, the base class has a set of functions that can be used to set and change certain derived-class variables. This type of behaviour, as far as I know, is 'illegal', as if it was supposed to be possible to alter derived class variables directly, the inheritance, by itself, should already allow this. The idea of interfaces (pure abstract base class) used with COM technologies follows the same principles as I have outlined here. I am not saying that COM was illegal, though.
I won't start wrestling about this issue any more than that. In conclusion, it could be said that this is a taste issue: some people think it is 'illegal' while some people think it is completely good and well. It all comes down on what you are trying to accomplish, I guess. I, for myself, see no reason on why you should be able to tamper with derived class members from the base class. Perhaps this is because I have never needed this type of functionality
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
It need to add functionality to many classes,
not by copy/paste,
bu just inheritance from making extension class,
to all needed classes.
But if it depends from MFC for sample, it need to access to MFC
in base - extension class.
|
|
|
|
|
I think, that you can't distinguish between interfaces and abstract base classes. Interfaces are only the extreme case of abstract base classes, where the member variables are forbidden.
If you use you own object model, you should simplify it and permit member variables to abstract base classes. But still there remain the "interface functionality" of the abstract base class, so the set-and-get virtual methods should be useful.
Robert-Antonio
"A piece of paper is an ink-lined plane.
An inclined plane is slope up.
A slow pup is a lazy dog.
Q.E.D.: A piece of paper is a lazy dog."
|
|
|
|
|