Solved

MSFlexGrid not working

Posted on 2003-11-20
9
1,351 Views
Last Modified: 2013-12-26
Hello,
I've written an ASP webpage with an MSFlexGrid on it.
The website run on an IIS5 server (Windows2000)
Both the IIS server and my development workstation have Visual Studio 6 loaded and the webpage runs just fine. However, when I access the page from a machine with Visual Studio on it, I get a page error. The error states 'Object or property not supported: MSFlexGrid1.Redraw
I've remarked out the line and the next FlexGrid statement errors the same way except on a different property. Example: 'Object or property not supported: MSFlexGrid1.FormatString
I'm using client-side VBscript to manipulate the grid. Example:
<SCRIPT LANGUAGE=vbscript>msflexgrid1.redraw</script>
The OCX appears to be in the Winnt\system32 folder and appears in the registry.
Also if I look in the Internet Setup of Internet Explorer on the client, I click the View Object button and see the control in the objects list. I've set all ActiveX security setting to PROMPT. I initially got the popup to download and install the control based on the CODEBASE line in the object tag. I have tried unregistering/re-registering the control several times. Any help would be greatly appreciated.

-mark
0
Comment
Question by:mdberk3
  • 4
  • 2
9 Comments
 
LVL 18

Expert Comment

by:Sethi
ID: 9804744
Please post your code.
0
 

Author Comment

by:mdberk3
ID: 9804853
Very simple.
First, I have a client side vbscript that calls a server side sub

<SCRIPT language=vbscript>
sub  window_onload
       <%FillCells%>
end sub
</SCRIPT>

this works fine

Then the server code to fill in grid starts like this but barks on very first line

<%
sub FillCells
      msflexgrid.FormatString = "Field1   | Field2   | Field3  "
end sub
%>

Nothing fancy really. I can't get past first line of code that references the grid.
I immediately get Property or method not supprted: msflexgrid.FormatString

My next line is msflexgrid.rows = 100
If I remark out the FormatString line, the error moves to next line msflexgrid.rows = 100

I have a feeling this has something to do with the control not registered properly or some vb runtime missing. But can't seem to nail it down. I even created a simple VB app that had the control in it. Loaded on the client. The VB app displayed the grid just fine. Its only when I use the control with ASP in IE that I get error.

Please help.

-mark

0
 
LVL 18

Expert Comment

by:Sethi
ID: 9805861
Difficult to know without the full code.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:mdberk3
ID: 9806238
The problem is definetly not the ASP code but will attach anyway. The code works fine on 4 other machines that have either Visual Basic or Visual Studio loaded. It has something to do with the OCX file not registering or being registerd incorrectly. Maybe has something to do with missing VB runtimes? I have the same exact problem with the DTPicker control on a different page which confirms my thought that is has to do with the control. Here is the block of code that is generating the error. The first Response.Write line in the FillCells sub is the one generating the error "Property or Method not supported: MSFlexGrid1.Rows
I've never used the Flexgrid or any ActiveX control on an ASP page in the past and can't find any documentation on the exact procedure to deploy the Flexgrid control. The only thing I was able to find was to add the codebase statement to the object tag that point to MS website for download and install.

Thnks for any help you can provide.

 <%@ LANGUAGE="VBSCRIPT" %>

   <HTML>
   <HEAD>
   <META NAME="GENERATOR" Content="Microsoft Visual InterDev 1.0">
   <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
   <TITLE>Document Title</TITLE>

<%
Dim conn,rs,SQL
set conn = server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")

'DSN less connection
conn.Provider = "Microsoft.Jet.OLEDB.4.0"
conn.ConnectionString = "Data Source=" & server.mappath("PeproTech.mdb")
conn.open
rs.Open "SELECT * FROM Product_Catalog ORDER BY Product_Catalog.CatalogNum", conn, , , adOpenKeyset

a = 0
do until rs.eof
a = a + 1
rs.movenext
loop
rs.movefirst
%>


   <!--METADATA TYPE="DesignerControl" endspan-->
   <%
      Sub FillCells
         Dim ctRow, ctCol, vbCrLF
         vbCrLf= Chr(13) & Chr(10)
         ctCol=0
         ' Note: added 1 to rows so that we can print field headings
         Response.Write "MSFlexGrid1.Rows=" & a+1 & vbCrLf
         Response.Write "MSFlexGrid1.Cols=" & rs.Fields.Count & vbCrLf
            
         ' Print field headings
              Response.Write "MSFlexGrid1.Row=0" & vbCrLf

         For Each fld in rs.Fields
            Response.Write "MSFlexGrid1.Col=" & ctCol & vbCrLf
          Response.Write "MSFlexGrid1.Text=" & Chr(34) & Trim(fld.Name) & Chr(34) & vbCrLf
            ctCol=ctCol+1
         Next

         ' Print data
         ctRow=1
         Do Until rs.eof
            Response.Write "MSFlexGrid1.Row=" & ctRow & vbCrLf
            ctCol=0
            For Each fld in rs.Fields
               Response.Write "MSFlexGrid1.Col=" & ctCol & vbCrLf
               Response.Write "MSFlexGrid1.Text=" & Chr(34) & Trim(fld) & Chr(34) & vbCrLf
               ctCol=ctCol+1
            Next

            rs.MoveNext
            ctRow=ctRow+1
         Loop
      End Sub
   %>

      <SCRIPT LANGUAGE="VBScript">
      <!--
      Sub window_onLoad()
         <%FillCells%>
      End Sub

      -->
      </SCRIPT>


   </HEAD>
   <BODY>

   <OBJECT ID="MSFlexGrid1" WIDTH=668 HEIGHT=156
    CLASSID="CLSID:6262D3A0-531B-11CF-91F6-C2863C385E30" codebase=http://activex.microsoft.com/controls/vb6/msflxgrd.cab>
      <PARAM NAME="_ExtentX" VALUE="17674">
      <PARAM NAME="_ExtentY" VALUE="4128">
      <PARAM NAME="_Version" VALUE="65541">
      <PARAM NAME="Rows" VALUE="2">
      <PARAM NAME="Cols" VALUE="1">
      <PARAM NAME="FixedRows" VALUE="1">
      <PARAM NAME="FixedCols" VALUE="0">
      <PARAM NAME="AllowUserResizing" VALUE="1">
   </OBJECT>

   </BODY>
   </HTML>
0
 
LVL 18

Accepted Solution

by:
Sethi earned 250 total points
ID: 9807867
MSflexgrid is dependent upon "ComCat.dll". This is one of the six basic VB runtime files that are required to run a VB application. So ensure that VB runtime 6 is installed on the machine where you are running this application or at least this dll is registered.
0
 
LVL 18

Expert Comment

by:Sethi
ID: 10483179
I answered the question.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create a duplicate finder Application 9 122
vb6 connector to mongodb 2 122
MS SQL store procedure to calculate and return result 6 63
VBA Shell can't Find Word document 11 114
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question