Click here to Skip to main content
15,879,535 members
Home / Discussions / Database
   

Database

 
QuestionChinese antique furniture Pin
Member 236383815-Oct-05 17:03
Member 236383815-Oct-05 17:03 
AnswerRe: Chinese antique furniture Pin
Colin Angus Mackay16-Oct-05 0:10
Colin Angus Mackay16-Oct-05 0:10 
AnswerRe: Chinese antique furniture Pin
Christian Graus16-Oct-05 12:57
protectorChristian Graus16-Oct-05 12:57 
QuestionApply UNIQUE using Visual Studio.Net Pin
Aayush Puri15-Oct-05 5:05
Aayush Puri15-Oct-05 5:05 
Questionchecking database Pin
abhinish15-Oct-05 1:11
abhinish15-Oct-05 1:11 
AnswerRe: checking database Pin
Colin Angus Mackay15-Oct-05 2:07
Colin Angus Mackay15-Oct-05 2:07 
GeneralRe: checking database Pin
abhinish16-Oct-05 0:01
abhinish16-Oct-05 0:01 
Questionado vc++ - datetime string or numbers to variant Pin
compoundeye14-Oct-05 20:55
compoundeye14-Oct-05 20:55 
Hello,

i'm working a VC++ class that calls stored procedures using ADO,
and i'd really like to know how to set a VARIANT to a datetime value,
without using COleDateTime class.


so instead of:

_ParameterPtr pParameter = m_pCommand->CreateParameter(
_bstr_t(sParamName.c_str()),
adDBTimeStamp,
adParamInput,
0,
_variant_t(COleDateTime(1998, 10, 1, 0, 0, 0))
);

m_pCommand->Parameters->Append( pParameter);

i'd like to go

VARIANT vMyDate;

...then some how set vMyDate to '1997-10-1 0Blush | :O Blush | :O '
then...

_ParameterPtr pParameter = m_pCommand->CreateParameter(
_bstr_t(sParamName.c_str()),
adDBTimeStamp, adParamInput,
0,
vMyDate
);

m_pCommand->Parameters->Append( pParameter);




why do i want to do this?

I'm working on an existing program, a massive monster of program with about 60 people working on it.

the existing class has functions which add parameters of various datatypes, but theres no function for datatime.

the program uses its own custom class to handle dates and times, from which i can easily extract formatted strings

I tried to use and the COleDateTime class, but the compiler didn't recognise it:

'COleDateTime' : undeclared identifier

I'd assume that means the correct header hasn't been included.
This is a bit of a problem, my workplace is very political and anti-microsoft (even though we use vc++ and mssql!), i'm very junior here, if i add a microsoft header file there's a very good chance someone senior will take it out and back out my changes.
Is there any chance that the header has been included and i need to specify a namespace?

I tried to add what i thought was the correct header:
afxdisp.h

and i get the error:

c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include

can anyone offer me any suggestions?

thanks

Mat
Questioncomplex query Pin
Joshua Lunsford14-Oct-05 12:02
Joshua Lunsford14-Oct-05 12:02 
AnswerRe: complex query Pin
Colin Angus Mackay14-Oct-05 13:14
Colin Angus Mackay14-Oct-05 13:14 
GeneralRe: complex query Pin
Joshua Lunsford17-Oct-05 11:49
Joshua Lunsford17-Oct-05 11:49 
AnswerRe: complex query Pin
miah alom17-Oct-05 4:46
miah alom17-Oct-05 4:46 
QuestionADO.NET Update / delete without primary keys Pin
Jasonc22114-Oct-05 11:10
Jasonc22114-Oct-05 11:10 
AnswerRe: ADO.NET Update / delete without primary keys Pin
miah alom17-Oct-05 5:52
miah alom17-Oct-05 5:52 
GeneralRe: ADO.NET Update / delete without primary keys Pin
Jasonc22117-Oct-05 7:33
Jasonc22117-Oct-05 7:33 
GeneralRe: ADO.NET Update / delete without primary keys Pin
miah alom17-Oct-05 8:35
miah alom17-Oct-05 8:35 
GeneralRe: ADO.NET Update / delete without primary keys Pin
Jasonc22118-Oct-05 9:22
Jasonc22118-Oct-05 9:22 
GeneralRe: ADO.NET Update / delete without primary keys Pin
l a u r e n21-Oct-05 15:04
l a u r e n21-Oct-05 15:04 
AnswerRe: ADO.NET Update / delete without primary keys Pin
S Douglas20-Oct-05 1:45
professionalS Douglas20-Oct-05 1:45 
AnswerRe: ADO.NET Update / delete without primary keys Pin
l a u r e n21-Oct-05 15:06
l a u r e n21-Oct-05 15:06 
GeneralRe: ADO.NET Update / delete without primary keys Pin
Jasonc22124-Oct-05 12:37
Jasonc22124-Oct-05 12:37 
QuestionSQL connection in servicedcomponents Pin
eliprand14-Oct-05 5:43
eliprand14-Oct-05 5:43 
AnswerRe: SQL connection in servicedcomponents Pin
eliprand14-Oct-05 6:08
eliprand14-Oct-05 6:08 
QuestionHow does Oracle support unicode text? Pin
Xiangyang Liu 刘向阳14-Oct-05 5:35
Xiangyang Liu 刘向阳14-Oct-05 5:35 
AnswerRe: How does Oracle support unicode text? Pin
DiWa14-Oct-05 19:30
DiWa14-Oct-05 19:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.