Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

No Hair left to pull so time for a last ditch effort here....

Old Jul 15, 2002 | 09:37 AM
  #1  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
Unhappy

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."
Reply
Old Jul 15, 2002 | 02:52 PM
  #2  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
Unhappy

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);
Reply
Old Jul 15, 2002 | 03:00 PM
  #3  
ozzy's Avatar
ozzy
Scooby Regular
 
Joined: Nov 1999
Posts: 10,504
Likes: 1
From: Scotland, UK
Unhappy

Sorry m8, but I'm sure all 65 of us who viewed it are just like me and don't have a fecking scooby

Stefan
Reply
Old Jul 15, 2002 | 04:15 PM
  #4  
GaryK's Avatar
GaryK
Scooby Regular
 
Joined: Sep 1999
Posts: 4,037
Likes: 0
From: Bedfordshire
Post

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
Reply
Old Jul 15, 2002 | 04:52 PM
  #5  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
Post

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
Reply
Old Jul 15, 2002 | 05:23 PM
  #6  
GaryK's Avatar
GaryK
Scooby Regular
 
Joined: Sep 1999
Posts: 4,037
Likes: 0
From: Bedfordshire
Post

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
Reply
Old Jul 16, 2002 | 11:31 AM
  #7  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
Post

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]
Reply

Trending Topics

Old Jul 16, 2002 | 12:37 PM
  #8  
GaryK's Avatar
GaryK
Scooby Regular
 
Joined: Sep 1999
Posts: 4,037
Likes: 0
From: Bedfordshire
Post

Dizzy,

What version of MDAC did you install? O well at least you solved the problem anyway!

Gary
Reply
Old Jul 16, 2002 | 03:50 PM
  #9  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
Post

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"
Reply
Old Jul 16, 2002 | 04:59 PM
  #10  
jjones's Avatar
jjones
Scooby Regular
 
Joined: Apr 1999
Posts: 4,410
Likes: 1
Post



[Edited by jjones - 7/16/2002 5:14:33 PM]
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Darrell@Scoobyworx
Trader Announcements
26
Jan 30, 2024 01:27 PM
SilverM3
ScoobyNet General
8
Feb 24, 2021 01:03 PM
alcazar
Non Scooby Related
37
Sep 27, 2015 10:35 PM
StueyBII
General Technical
4
Sep 26, 2015 12:35 PM
StueyBII
General Technical
0
Sep 25, 2015 05:58 PM


Thread Tools
Search this Thread

All times are GMT +1. The time now is 08:37 PM.