Click here to Skip to main content
15,914,109 members
Home / Discussions / Database
   

Database

 
GeneralRe: Generate Insert Statement Pin
Colin Angus Mackay20-Jan-05 22:42
Colin Angus Mackay20-Jan-05 22:42 
GeneralRe: Generate Insert Statement Pin
Sebastien Lachance21-Jan-05 3:45
Sebastien Lachance21-Jan-05 3:45 
GeneralRe: Generate Insert Statement Pin
Colin Angus Mackay21-Jan-05 4:00
Colin Angus Mackay21-Jan-05 4:00 
GeneralAny tutorial/link on developing applications for Windows CE .NET using C# Pin
amittinku19-Jan-05 18:44
amittinku19-Jan-05 18:44 
GeneralQuery Pin
Yulianto.19-Jan-05 16:31
Yulianto.19-Jan-05 16:31 
GeneralRe: Query Pin
Mike Ellison19-Jan-05 17:26
Mike Ellison19-Jan-05 17:26 
GeneralRe: Query Pin
Yulianto.19-Jan-05 18:00
Yulianto.19-Jan-05 18:00 
Generala problem about resultset from a procedure Pin
luobo19-Jan-05 16:01
luobo19-Jan-05 16:01 
Hi,I have a problem when I try to get resultset from a procedure.
if there is only select statement in my procedure,it works fine.
but if I add a insert statement in procedure,pRst->GetState() will return adStateClosed

develop environment:
vc6+MDAC2.7
sql server 2000

here is the procedure code:

create table tem(t_id int,t_date datetime)
go
insert tem select 1,dateadd(minute,1,getdate())
go
drop proc pTest
go
create proc pTest
as begin
--insert tem select 2,dateadd(minute,2,getdate()) --if I add this line,it won't work
select * from tem
end
go


here is the ado code:

_ConnectionPtr pConn;
_RecordsetPtr pRst;
_CommandPtr pCmd;

pConn.CreateInstance(__uuidof(Connection));
pCmd.CreateInstance(__uuidof(Command));
pRst.CreateInstance(__uuidof(Recordset));
....
try
{
pCmd->CommandText = "pTest";
pRst = pCmd->Execute(NULL,NULL,adCmdStoredProc);
//pRst = pConn->Execute("pTest",NULL,adCmdText);
//both of above return adStateClosed
}
catch (_com_error &e)
{
....
}

thanks
GeneralSET NOBROWSETABLE Pin
Axsys19-Jan-05 15:50
Axsys19-Jan-05 15:50 
GeneralRe: SET NOBROWSETABLE Pin
Mike Dimmick20-Jan-05 1:44
Mike Dimmick20-Jan-05 1:44 
GeneralCopy DataSet and change primary key in Relations Pin
triton63019-Jan-05 12:56
triton63019-Jan-05 12:56 
GeneralDateTime no Time transferred Pin
cje19-Jan-05 9:43
cje19-Jan-05 9:43 
GeneralRe: DateTime no Time transferred Pin
Michael Potter20-Jan-05 9:51
Michael Potter20-Jan-05 9:51 
GeneralQuery on 2 DB Pin
Sebastien Lachance19-Jan-05 9:35
Sebastien Lachance19-Jan-05 9:35 
GeneralRe: Query on 2 DB Pin
David Salter19-Jan-05 11:16
David Salter19-Jan-05 11:16 
QuestionDataBind causing infinite loop? Pin
Evan Schultz19-Jan-05 6:38
Evan Schultz19-Jan-05 6:38 
GeneralSQL - Autonumber - Remove Pin
Purple Monk19-Jan-05 1:50
Purple Monk19-Jan-05 1:50 
GeneralRe: SQL - Autonumber - Remove Pin
David Salter19-Jan-05 7:57
David Salter19-Jan-05 7:57 
GeneralRe: SQL - Autonumber - Remove Pin
Purple Monk19-Jan-05 23:21
Purple Monk19-Jan-05 23:21 
GeneralRe: SQL - Autonumber - Remove Pin
David Salter20-Jan-05 11:12
David Salter20-Jan-05 11:12 
GeneralSQL UPDATE Multiple Params Pin
Vector718-Jan-05 22:10
Vector718-Jan-05 22:10 
GeneralRe: SQL UPDATE Multiple Params Pin
Colin Angus Mackay18-Jan-05 22:59
Colin Angus Mackay18-Jan-05 22:59 
GeneralRe: SQL UPDATE Multiple Params Pin
Mike Dimmick18-Jan-05 23:02
Mike Dimmick18-Jan-05 23:02 
GeneralRe: SQL UPDATE Multiple Params Pin
Vector719-Jan-05 0:31
Vector719-Jan-05 0:31 
QuestionMSDE installation problem?? Pin
BSRK18-Jan-05 22:06
BSRK18-Jan-05 22:06 

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.