|
The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024
|
Latest message you have seen: RE: Square one stuff |
[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
RE: Re: Vbscript question
- To: ukha_d@xxxxxxx
- Subject: RE: Re: Vbscript question
- From: "Mark Marooth" <MMarooth@xxxxxxx>
- Date: Thu, 30 May 2002 15:33:03 +0100
- Mailing-list: list ukha_d@xxxxxxx; contact
ukha_d-owner@xxxxxxx
- Reply-to: ukha_d@xxxxxxx
Daniel,
Slightly different method which ensures that your recordset is readforward
and
readonly. I have a class which takes care of all this for me which I
include in
every VB application that I write. If you are interested ina copy of
the class,
drop me a note - offline.
Set cnn = New ADODB.Connection
Set cmd = New ADODB.Command
Set rst = New ADODB.Recordset
Set cmd.ActiveConnection = cnn
cmd.CommandText = QuerySQL 'Your SQL
Query
rst.CursorLocation = adUseClient
rst.Open cmd, , adOpenForwardOnly, adLockReadOnly
If rst.RecordCount = 0 Then
rst.Close
Exit Sub
End If
.
.
.
.
.
Mark
--------+----------------------------->
"James,
Daniel"
<daniel.james@xxxxxxx
nge.co.uk>
30/05/2002
15:05
Please respond
to
ukha_d
--------+----------------------------->
>----------------------------------------------------------------------------
To:
"'ukha_d@xxxxxxx'"
<ukha_d@xxxxxxx>
cc: (bcc:
Mark
Marooth/SCOTIA)
Subject: RE:
[ukha_d] Re: Vbscript
question
>----------------------------------------------------------------------------
Perfect, thanks Andy
Daniel - slowly Learning vbscript on the fly :-)
-----Original Message-----
From: andy_powell_is [mailto:ukha@xxxxxxx]
Sent: 30 May 2002 15:07
To: ukha_d@xxxxxxx
Subject: [ukha_d] Re: Vbscript question
Daniel,
Try,
set rs = objconn.execute(strSQL)
While not rs.EOF
PersonsName = rs("FieldNameInYourdb")
rs.movenext
Wend
set rs = nothing
Obviously 'FieldNameInYourdb' is whatever the name field in your
database is
Andy
---In ukha_d@y..., "James, Daniel" <daniel.james@e...>
wrote:
> Hi all
>
> I've not marked this as OT, as its related to Homeseer :-)
>
> I have managed to write a script that writes the number received
on
my
> meteor into a Database, so I can record who called :-)
>
> Anyhow I'm now looking at using a lookup to find the name of the
person who
> called, against my directory of names and numbers.
>
> My problem is how I get the output from my SQL statement into a
variable
> that I can use in the code:
>
> small snippet:
>
> I so far have:
>
> strSQL = "SELECT tblDirectory.Name FROM tblDirectory WHERE
> tblDirectory.Number =" & "'" & sNumber &
"';"
>
> objConn.Execute(strSQL)
>
> but how do I get the output from the SQL statement back into
homeseer?
>
> Any ideas appreciated!!
>
> Daniel
>
>
> ***********************************************************
> This message is confidential and intended for the exclusive
> use of the addressee(s) only and remains the property of
> Exchange FS Group plc. You should not disclose its contents
> to any other person. If you are not the intended recipient
> please notify the sender named above immediately.
>
> Registered Office: Munro House, Portsmouth Road, Cobham,
> Surrey, KT11 1TE. Registered in England No. 2596452
> ***********************************************************
For more information: http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe: ukha_d-subscribe@xxxxxxx
Unsubscribe: ukha_d-unsubscribe@xxxxxxx
List owner: ukha_d-owner@xxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
For more information: http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe: ukha_d-subscribe@xxxxxxx
Unsubscribe: ukha_d-unsubscribe@xxxxxxx
List owner: ukha_d-owner@xxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Yahoo! Groups
Sponsor |
ADVERTISEMENT
|
|
|
For more information: http://www.automatedhome.co.uk
Post message: ukha_d@xxxxxxx
Subscribe: ukha_d-subscribe@xxxxxxx
Unsubscribe: ukha_d-unsubscribe@xxxxxxx
List owner: ukha_d-owner@xxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Home |
Main Index |
Thread Index
|
|