By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

GetString method

P: n/a

Anyone have a suggestion for trapping errors while using the ADO GetString
method? I'm using:

Dim varA
varA = CurrentProject.Connection.Execute( _
"Select FOO From BAR Where Field = Value").GetString

If no records are returned an error is generated. Is Resume Next the best
(perhaps the only) way to handle those errors? Or is there a better way to
do it?
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Randy,

aircode follows:

dim rs as adodb.recordset
set rs = CurrentProject.Connection.Execute( _
"Select FOO From BAR Where Field = Value").
with rs
if rs.recordcount <> 0 the vara = rs.getstring

-malcolm
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:ir****************@newssvr33.news.prodigy.com ...

Anyone have a suggestion for trapping errors while using the ADO GetString
method? I'm using:

Dim varA
varA = CurrentProject.Connection.Execute( _
"Select FOO From BAR Where Field = Value").GetString

If no records are returned an error is generated. Is Resume Next the best
(perhaps the only) way to handle those errors? Or is there a better way to do it?

Nov 13 '05 #2

P: n/a

"Malcolm Cook" <me*@stowers-institute.org> wrote in message
news:jc***************@news.more.net...
Randy,

aircode follows:

dim rs as adodb.recordset
set rs = CurrentProject.Connection.Execute( _
"Select FOO From BAR Where Field = Value").
with rs
if rs.recordcount <> 0 the vara = rs.getstring

-malcolm
Ah, that avoids the error entirely. Thanks Malcom.

Randy
"Randy Harris" <ra***@SpamFree.com> wrote in message
news:ir****************@newssvr33.news.prodigy.com ...

Anyone have a suggestion for trapping errors while using the ADO GetString method? I'm using:

Dim varA
varA = CurrentProject.Connection.Execute( _
"Select FOO From BAR Where Field = Value").GetString

If no records are returned an error is generated. Is Resume Next the best (perhaps the only) way to handle those errors? Or is there a better way

to
do it?


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.