index | search | no replies | posting guidelines | help | login | register |
Index » Products » ASP DataGrid |
| |||||||
May 21 2004, 6:53 PM |
| ||||||
thomasgroup from: Omaha | Not quite. Here is the error: Error Type: Microsoft VBScript runtime (0x800A01F9) Invalid or unqualified reference /umarm/grid/test.asp, line 41 Here is the code: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 'declare variables Dim objGrid Dim strConn Dim strSQL 'Build a connection string to the Northwind database strConn = "Provider=MSDASQL;Driver={SQL Server};Server=xxx.xx.xxxx;Database=xxxx;User ID=xxxx;Password=xxxx;" 'Build an SQL command statement strSQL = "select * from users" ' Create an instance of DataGrid Set objGrid = Server.CreateObject("AspWebSolution.DataGrid") With objGrid 'Set your command statement .Command = strSQL 'Set your desired font colors & style .GridStyle = "background-color:gray;" .HeaderStyle = "background-color:#666699;" .HeaderTextStyle = "color:white;font-family:verdana;font-size:8pt;" .ItemStyle = "background-color:#d2d1de;color:000000;font-family:verdana;font-size:8pt;" .AltItemStyle = "background-color:#f5f5f5;color:000000;font-family:verdana;font-size:8pt;" .FooterStyle="font-family:verdana;font-size:8pt;" 'Create a databse connection .CreateConnection (strConn) End With %> <html> <head><title>My Title</title></head> <body> <h1>Hello World</h1> <% 'Display the data grid .Display 'distroy objects Set objGrid = Nothing %> </body> </html> | ||||||
Pages: (1) [1] |