|
 |
asp_databases thread: Difference in Execution between Win98 and Win2000
Message #1 by "James Texter" <texter@o...> on Fri, 26 May 2000 16:48:41
|
|
I do some development on my notebook, running Windows 2000, and then copy
it over to my work machine, running PWS on Win98. I have a script that
pulls a recordset from an Access mdb, and then loops through and creates a
table. The script works BEAUTIFULLY on my Windows 2000 machine, but under
PWS, it goes about halfway, then I get an "Unspecified Error" message.
Here is the code:
Public Sub FillTable(Area, Denomination)
Dim cmChurches
Dim rsChurches
Dim ChurchesSql
Dim ConnectionString
ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0;DataSource=C:\Inetpub\wwwroot\Lists\Lists.mdb"
ChurchesSql = "SELECT Churches.ChurchName, Churches.ChurchStreet,
Churches.ChurchPhoneNum, Churches.ChurchMailingAddress, Ministers.Name,
Area.Area, Area.UniqueKey, Denomination.DenominationName,
Denomination.UniqueKey FROM Denomination INNER JOIN ((Churches INNER JOIN
Ministers ON Churches.UniqueKey = Ministers.Church) INNER JOIN Area ON
Churches.Area = Area.UniqueKey) ON (Denomination.UniqueKey =
Churches.Denomination) WHERE (((Area.UniqueKey)=" & Area & ") AND
((Denomination.UniqueKey)=" & Denomination & "));"
Set cmChurches = server.CreateObject("ADODB.Command")
*cmChurches.ActiveConnection = ConnectionString
cmChurches.CommandText = ChurchesSql
cmChurches.CommandType = adCmdText
Set rsChurches = cmChurches.Execute
If (rsChurches.BOF AND rsChurches.EOF) Then
Exit Sub
Else
rsChurches.MoveFirst
End If
Do While Not rsChurches.EOF
Response.Write("<TR><TD>" & rsChurches.Fields("ChurchName") & "</TD><TD>"
& rsChurches.Fields("ChurchStreet") & "</TD>")
Response.Write("<TD>" & rsChurches.Fields("ChurchPhoneNum") & "</TD>")
If IsNull(rsChurches.Fields("ChurchMailingAddress")) Then
Response.Write("<TD> </TD>")
Else
Response.Write("<TD>" & rsChurches.Fields("ChurchMailingAddress") &
"</TD>")
End If
Response.Write("<TD>" & rsDenomination.Fields("DenominationName") &
"</TD><TD>" & rsArea.Fields("Area") & "</TD>")
rsChurches.MoveNext
Loop
Set rsChurches = Nothing
Set cmChurches = Nothing
End Sub
The error is occuring on the * line. Any ideas as to what is causing the
error on one and not the other?
James
Message #2 by "Ken Schaefer" <ken.s@a...> on Mon, 29 May 2000 17:16:45 +1000
|
|
Different MDAC versions?
Win2000 comes with MDAC v2.5 - download it from
http://www.microsoft.com/data if you want to update your Win98 machine.
Cheers
Ken
----- Original Message -----
From: "James Texter"
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, May 26, 2000 4:48 PM
Subject: [asp_databases] Difference in Execution between Win98 and Win2000
> I do some development on my notebook, running Windows 2000, and then copy
> it over to my work machine, running PWS on Win98. I have a script that
> pulls a recordset from an Access mdb, and then loops through and creates a
> table. The script works BEAUTIFULLY on my Windows 2000 machine, but under
> PWS, it goes about halfway, then I get an "Unspecified Error" message.
> Here is the code:
|
|
 |