No Hair left to pull so time for a last ditch effort here....
#1
Please help.. I've just about lost patients with this now. I've hunted for examples in google back can't get the ADO object to send data to a MEMO / TEXT field
=============================================
// I set up the parameter here....
pParam8 = pCmd->CreateParameter("Param8", adLongVarChar, adParamInput,16, nValue="");
hr = pParameters->Append(pParam8);
//Set it with some data
COleVariant strVar="aewfaewf wafe ae f";
pParam8->AppendChunk(strVar);
//And tell the pile o cack to do stuff (or atleast try too)
pRset=pCmd->Execute(&vRowsAffected, &vNull, adCmdText);
=============================================
and this is what I get
"Application uses a value of the wrong type for the current operation."
=============================================
// I set up the parameter here....
pParam8 = pCmd->CreateParameter("Param8", adLongVarChar, adParamInput,16, nValue="");
hr = pParameters->Append(pParam8);
//Set it with some data
COleVariant strVar="aewfaewf wafe ae f";
pParam8->AppendChunk(strVar);
//And tell the pile o cack to do stuff (or atleast try too)
pRset=pCmd->Execute(&vRowsAffected, &vNull, adCmdText);
=============================================
and this is what I get
"Application uses a value of the wrong type for the current operation."
#2
ah well 65 reads n no replies :'(
I've made some progress now but now the Execute command just crashes no exception .
Any ideas ?
//The correct prarameter creation
pParam8 = pCmd->CreateParameter("Param8", adLongVarChar, adParamInput,2147483647, nValue="test");
// I now have to make a byte safe array to insert the data
pParam8->AppendChunk(strVar);
//This causes an access violation in SQLOLEDB
pCmd->Execute(NULL,NULL, adCmdText);
I've made some progress now but now the Execute command just crashes no exception .
Any ideas ?
//The correct prarameter creation
pParam8 = pCmd->CreateParameter("Param8", adLongVarChar, adParamInput,2147483647, nValue="test");
// I now have to make a byte safe array to insert the data
pParam8->AppendChunk(strVar);
//This causes an access violation in SQLOLEDB
pCmd->Execute(NULL,NULL, adCmdText);
#4
Scooby Regular
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes
on
0 Posts
Dizzy,
Sorry didnt catch the last thread, why are using a variant array?
Im guessing you're using C++ builder and SQL Server? Im assuming you've tried using a normal adVarChar type and do a simple string value assignment.
Im busting my b*lls with work at the mo, but in a couple of days may be able t look (if its C++ it easy to port to my dev. tool of choice: Delphi) to take a look.
Cheers
Gary
Sorry didnt catch the last thread, why are using a variant array?
Im guessing you're using C++ builder and SQL Server? Im assuming you've tried using a normal adVarChar type and do a simple string value assignment.
Im busting my b*lls with work at the mo, but in a couple of days may be able t look (if its C++ it easy to port to my dev. tool of choice: Delphi) to take a look.
Cheers
Gary
#5
cheers...
I'm having to convert to a Safe array as its inserting into a MEMO field (or TEXT in SQL Server) If you dont you just get a crappy "Bad Data type" or some such tripe. I always write in VC++ and if the need arrises <shudder> VB </shudder>
Infact I may actually try it in VB now
I'm having to convert to a Safe array as its inserting into a MEMO field (or TEXT in SQL Server) If you dont you just get a crappy "Bad Data type" or some such tripe. I always write in VC++ and if the need arrises <shudder> VB </shudder>
Infact I may actually try it in VB now
#6
Scooby Regular
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes
on
0 Posts
What happened when you set the datatype to varchar in SQLServer?
Ahh see you should use C++Builder: gives you the power VC++ and gives you the ease of VB. God yeah VB, I would rather get a job outside IT than use VB to write software, it sucks!
Gary
Ahh see you should use C++Builder: gives you the power VC++ and gives you the ease of VB. God yeah VB, I would rather get a job outside IT than use VB to write software, it sucks!
Gary
#7
ok all I can say is
O M F G
1) It just bombs in 2000
2) I just tried it on NT and got a "Catastrophic Failure"!! Finaly and Error msg!
I hunted around and it turns out its a Smeggin DRIVER BUG!!! it loads the Winmm.dll in the wrong order and causes a crash [img]images/smilies/mad.gif[/img] All i had to do was try it on access [img]images/smilies/mad.gif[/img][img]images/smilies/mad.gif[/img][img]images/smilies/mad.gif[/img][img]images/smilies/mad.gif[/img]
O M F G
1) It just bombs in 2000
2) I just tried it on NT and got a "Catastrophic Failure"!! Finaly and Error msg!
I hunted around and it turns out its a Smeggin DRIVER BUG!!! it loads the Winmm.dll in the wrong order and causes a crash [img]images/smilies/mad.gif[/img] All i had to do was try it on access [img]images/smilies/mad.gif[/img][img]images/smilies/mad.gif[/img][img]images/smilies/mad.gif[/img][img]images/smilies/mad.gif[/img]
Trending Topics
#9
I've completely finished now
I run Win2k which doesn't use "MDAC" installations as they come within service packs...
I still can't understand why they havn't fixed it when they claim it shouldn't happen though ADO I suppose I could contact there "support" and pay them for the priverlage of hearing "yes, we know"
I run Win2k which doesn't use "MDAC" installations as they come within service packs...
I still can't understand why they havn't fixed it when they claim it shouldn't happen though ADO I suppose I could contact there "support" and pay them for the priverlage of hearing "yes, we know"
Thread
Thread Starter
Forum
Replies
Last Post