index | search | no replies | posting guidelines | help login | register
Index » Products » ASP DataGrid
search this forum:
:: store procedure ::    show all messagesPost a New Message | Post a Reply
Aug 20 2004, 6:01 AM
 Re: store procedurePost a Reply
 whichman

View this author's profile Send this author a private message Visit author's homepage

from: Laurel, MD

I keep on getting "Subscript out of range" error

I couldn't re-create this error but it seems that the datagrid is either miscalculating the number of fields returned by your procedure or the number of records returned.

Can you please let me know at exactly what stage this happens, does the anything even show up? Does this procedure work from the ReportWizard?

thanx!

I think it might have something to do with trying to make a temp table and cross tab record set.

This current version of the  datagrid doesn't build create temp tables, actually, it doesn't create anything (apart from the ReportsFile & Local files).

I created the table zQAUR with similar fields as the ones in your stored procedure and added sample data. - It seems to be working fine - my page script is shown below:


<%
'declare variables
  Dim objGrid  
  Dim strConn  
  
'Build a connection string to the Northwind database
strConn = "Provider=MSDASQL;Driver={SQL Server};Server=THETMAN;Database=Test;User ID=sa;Password=sa;"
  
' Create an instance of DataGrid
  Set objGrid = Server.CreateObject("AspWebSolution.DataGrid")  
  
  With objGrid  
      .SetProcedure("qaur")  
     Call .AddParameter("var1", 200312)  
     Call .AddParameter("var2", 200408)  
      
    'Create a databse connection  
     .CreateConnection (strConn)  
  
      
      
     'add some 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;"
  End  With  
%>
<html>
<head><title>Qaur Data</title></head>
<body scroll=auto><table><tr><td>
<%
    'Display the data grid  
     objGrid.Display  
  
     'distroy objects
      Set objGrid =  Nothing
%>
</td></tr></table></body>
</html>


You can click on the link below to see the screen shot
http://www.cityjams.com/tmp/qaur.gif


-------------------------
Master of the Game
Pages: (1)   [1]

search this forum: