Click here to Skip to main content
15,898,877 members
Home / Discussions / Database
   

Database

 
AnswerRe: Import XML file in SQL Server 2000 database Pin
enjoycrack17-Oct-05 16:35
enjoycrack17-Oct-05 16:35 
QuestionDataTable, DataView, and DataGridView databinding and display Pin
Drew McGhie17-Oct-05 5:44
Drew McGhie17-Oct-05 5:44 
AnswerRe: DataTable, DataView, and DataGridView databinding and display Pin
miah alom17-Oct-05 5:48
miah alom17-Oct-05 5:48 
QuestionEarly Binding Problem Pin
itkid17-Oct-05 5:31
itkid17-Oct-05 5:31 
QuestionConverting 1000 into 10.00 Pin
hasanali0017-Oct-05 4:57
hasanali0017-Oct-05 4:57 
AnswerRe: Converting 1000 into 10.00 Pin
miah alom17-Oct-05 5:44
miah alom17-Oct-05 5:44 
QuestionAccess Hyperlink Field Pin
T-Smooth17-Oct-05 2:19
T-Smooth17-Oct-05 2:19 
Questionsteps of configure the MySQL database in Windows XP Pin
khuchaiz16-Oct-05 13:18
khuchaiz16-Oct-05 13:18 
QuestionDataGrid Pin
kkchh16-Oct-05 4:55
kkchh16-Oct-05 4:55 
AnswerRe: DataGrid Pin
miah alom17-Oct-05 5:31
miah alom17-Oct-05 5:31 
GeneralRe: DataGrid Pin
Anonymous18-Oct-05 14:56
Anonymous18-Oct-05 14:56 
GeneralRe: DataGrid Pin
miah alom19-Oct-05 3:56
miah alom19-Oct-05 3:56 
GeneralRe: DataGrid Pin
Anonymous19-Oct-05 14:34
Anonymous19-Oct-05 14:34 
AnswerRe: DataGrid Pin
dwatkins@dirq.net18-Oct-05 6:01
dwatkins@dirq.net18-Oct-05 6:01 
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 

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.