NYCPHP Meetup

NYPHP.org

[nycphp-talk] Error: Microsoft VBScript compilation (0x800A0400)

rinaldy roy rinaldy_roy at yahoo.com
Mon Aug 29 01:49:10 EDT 2005


I've error meassage : < Microsoft VBScript compilation (0x800A0400)
Expected statement
/display_pelanggan.asp, line 39
<table border="1.5" cellpadding="2" cellspacing="1" width="75%"> from sample program  as below: 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
 <title>DISPLAY PELANGGAN</title>
</head>
<body>
 
<%
' -- Declare Variables
Dim objConn   ' Our Connection Object
Dim objRS   ' Our Recordset Object
Dim strSQL   ' Our SQL String to access the database
Dim strConnection ' Our Connection string to access the database
Dim i    ' a counter variable
' -- Create objects
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open "DSN=pelanggan;uid=Admin;pwd=;"
' -- Our SQL Statement
strSQL = "SELECT * FROM master_pelanggan"
' -- Populate our Recordset with data
set objRS = objConn.Execute (strSQL)
' -- Open the Connection
objConn.Open strConnection
' -- Populate our Recordset with data
set objRS = objConn.Execute (strSQL)
if (objRS.BOF and objRS.EOF) then
 response.write "No records found"
 response.end
End if
<table border="1.5"  cellpadding="2"  cellspacing="1" width="75%" 
 ' -- Output the Field Names as the first row in the table
 Response.Write "<TR BGCOLOR=""#CCCCCC"">"
 For i = 0 to objRS.Fields.Count - 1
  Response.Write "<TH>" & objRS.Fields(i).Name & "</TH>"
 Next
 Response.write "</TR>"
' -- Now output the contents of the Recordset
 objRS.MoveFirst
 Do While Not objRS.EOF
  ' -- output the contents
  Response.Write "<TR>"
  For i = 0 to objRS.Fields.Count - 1
   Response.Write "<TD>" & objRS.Fields(i) & "</TD>"
  Next
  Response.write "</TR>"
  ' -- move to the next record
  objRS.MoveNext
 Loop
objRS.Close
 set objRS = Nothing
 objConn.Close
 set objConn = Nothing
%>
</body>
</html>
 
>From MS Office notes, It's suggested to update my windows application. Is there any solution?
 
Regards,
 
Rinaldy RM

		
---------------------------------
 Start your day with Yahoo! - make it your home page 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050828/27f09187/attachment.html>


More information about the talk mailing list