Hello All,
I hope somebody can help me out here.
How can I create an array using this connection :
Set conn = CreateObject("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
conn.open "schoolsasp","schoolsasp","schoolsasp"
SQL = "SELECT * FROM vSchoolDetails ORDER BY EstablishmentName"
If cstr(Param) <> "" And cstr(Data) <> "" Then
sql = sql & " And [" & cstr(Param) & "] = " & cstr(Data)
End If
Set ors = CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
ors.Open sql, conn, 3, 3
then place the results into VBScript so I can then pick up with :
oApp.Selection.TypeText "The Headteacher "
oApp.Selection.TypeParagraph
.Fields.Add oApp.Selection.Range, "EstablishmentName"
oApp.Selection.TypeParagraph
.Fields.Add oApp.Selection.Range, "Address1"
oApp.Selection.TypeText ", "
.Fields.Add oApp.Selection.Range, "Address2"
oApp.Selection.TypeText ", "
.Fields.Add oApp.Selection.Range, "County"
oApp.Selection.TypeParagraph
.Fields.Add oApp.Selection.Range, "PostCode"
oApp.Selection.TypeParagraph
?
at present My connection and SQL is all done within VBScript, but I want that part to take place on the web server.
any help is appreciated
Jamie
I hope somebody can help me out here.
How can I create an array using this connection :
Set conn = CreateObject("ADODB.Connection"
conn.open "schoolsasp","schoolsasp","schoolsasp"
SQL = "SELECT * FROM vSchoolDetails ORDER BY EstablishmentName"
If cstr(Param) <> "" And cstr(Data) <> "" Then
sql = sql & " And [" & cstr(Param) & "] = " & cstr(Data)
End If
Set ors = CreateObject("ADODB.Recordset"
ors.Open sql, conn, 3, 3
then place the results into VBScript so I can then pick up with :
oApp.Selection.TypeText "The Headteacher "
oApp.Selection.TypeParagraph
.Fields.Add oApp.Selection.Range, "EstablishmentName"
oApp.Selection.TypeParagraph
.Fields.Add oApp.Selection.Range, "Address1"
oApp.Selection.TypeText ", "
.Fields.Add oApp.Selection.Range, "Address2"
oApp.Selection.TypeText ", "
.Fields.Add oApp.Selection.Range, "County"
oApp.Selection.TypeParagraph
.Fields.Add oApp.Selection.Range, "PostCode"
oApp.Selection.TypeParagraph
?
at present My connection and SQL is all done within VBScript, but I want that part to take place on the web server.
any help is appreciated
Jamie