BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

using .Clear with a stored prarm component

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Craig Andrews
Guest





PostPosted: Tue Dec 30, 2003 7:14 pm    Post subject: using .Clear with a stored prarm component Reply with quote



Hello,

I was told to use the .clear and .bound methods to assign a null value to a
stored procedure parameter:
spInsert.Parameters.ParamByName('@FirstName').clear;
spInsert.Parameters.ParamByName('@FirstName').bound := True;

but I receive the error: Undeclared identifier: 'Clear'
Also CodeInsight doesn't offer a Clear property. I'm obviously doing
something wrong but I have no idea what.

Any help is greatly appreciated.

Thanks in advance,
Craig



Back to top
Bill Todd (TeamB)
Guest





PostPosted: Tue Dec 30, 2003 11:20 pm    Post subject: Re: using .Clear with a stored prarm component Reply with quote



What data access components are you using? What component is spInsert?
I assume you are using SQL Server 2000, is that correct?

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Back to top
Craig Andrews
Guest





PostPosted: Wed Dec 31, 2003 8:06 pm    Post subject: Re: using .Clear with a stored prarm component Reply with quote



Sorry, more info follows:

ADO components, SQL Server 2000

Craig

"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote

Quote:
What data access components are you using? What component is spInsert?
I assume you are using SQL Server 2000, is that correct?

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)



Back to top
Craig Andrews
Guest





PostPosted: Wed Dec 31, 2003 8:07 pm    Post subject: Re: using .Clear with a stored prarm component Reply with quote

neglected to include: spInsert is the name of the ADO Stored Procecude
component.

Craig

"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote

Quote:
What data access components are you using? What component is spInsert?
I assume you are using SQL Server 2000, is that correct?

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)



Back to top
Bill Todd (TeamB)
Guest





PostPosted: Wed Dec 31, 2003 9:48 pm    Post subject: Re: using .Clear with a stored prarm component Reply with quote

Try

spInsert.Parameters.ParamByName('@FirstName').Value := Null;

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Back to top
craig
Guest





PostPosted: Wed Dec 31, 2003 10:02 pm    Post subject: Re: using .Clear with a stored prarm component Reply with quote

Thanks for the reply! I would have bet money that I tried that and it
didn't work, but I just tried it again and it did, so all I can say is
"duh".

Thanks again for your help.
Craig

"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote

Quote:
Try

spInsert.Parameters.ParamByName('@FirstName').Value := Null;

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.