Solved

MSFlexGrid not working

Posted on 2003-11-20
9
1,359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month9 days, 2 hours left to enroll

617 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