Re: Translation -
07-07-2003
, 02:15 AM
Hello, ScubaFrog!
In VBScript there is no such thing as
DIM a as <whatever>
so whereas in VB we would do
dim rs as ADODB.Recordset
in VBScript we would do
dim rs
SET rs = CREATEOBJECT("ADODB.Recordset")
Have a look at this tutorial
http://www.geocities.com/cliktoprogr...roduction.html
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
: Example:
: Sub GetCreditTypeComm(G As Variant, R As Double, N As
: String)
: Dim cmd As New ADODB.Command
: Dim rs As New ADODB.Recordset
: Dim rs1 As New ADODB.Recordset
: Dim dt As New Recordset, dt2 As New Recordset
: R = 0
: N = ""
: dt.Open "select * from CREDITTYPE where ID=" & G, cn,
: adOpenForwardOnly
: If Not dt.EOF Then
: dt2.Open "select * from COMMTYPE where ID=" & dt
: ("COMMTYPEID"), cn, adOpenStatic, adLockOptimistic
: If Not dt2.EOF Then
: R = MoveAmt2(dt2("RATE"))
: N = "RATE" & MoveStr2(dt2("NAME"))
: End If
: dt2.Close
: End If
: End Sub
: I need to know how to declare the "Sub GetCreditTypeComm(G
: As Variant, R As Double, N As String)" part for VBScript.
--- Microsoft CDO for Windows 2000 |