Solved

Data Grid/Control

Posted on 2001-07-02
16
599 Views
Last Modified: 2013-12-24

I'm having trouble getting the Microsoft Data Control and Microsoft Data Grid to work in FrontPage the way I'm used to them working in VB6.

I created a new page in FrontPage.  Added one of each of the above mentioned controls.  I used to the ConnectString, CommandType, and RecordSource parameters on the Data Control to point to a stored procedure in an Microsoft SQl Server 7.0 database.

Then I added the DataSource parameter to the Data Grid, because it wasn't in the default list,  and made it's value the name of the data control.

However when I go to preview it both controls are grayed out with no data.  Any suggestions???
0
Comment
Question by:cube
[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
  • 5
  • 5
  • 3
  • +3
16 Comments
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6248485
This MAY be one of those features that doesn't work in preview mode....have you tried looking at it from a web server??
0
 

Author Comment

by:cube
ID: 6249225
Yes, I have tried it using Microsoft Internet Explorer 5.5.  It does not work their either.  

A bit more background:  I started this whole process taking a Visual Basic program and converting it to an ActiveX compenent for Internet Distribution.  I got that all working and wanted to cut the Visual Basic piece out and just have a straight web page.  

I know I can't be far  from getting this working, but I don't understand what I'm doing wrong yet.
0
 

Author Comment

by:cube
ID: 6249291
If it helps, here's the HTML that FrontPage generated:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>

<p>
<object classid="clsid:67397AA3-7FB1-11D0-B148-00A0C922E820" id="Adodc1" width="100" height="50">
  <param name="_ExtentX" value="2646">
  <param name="_ExtentY" value="1323">
  <param name="ConnectMode" value="0">
  <param name="CursorLocation" value="3">
  <param name="IsolationLevel" value="-1">
  <param name="ConnectionTimeout" value="15">
  <param name="CommandTimeout" value="30">
  <param name="CursorType" value="3">
  <param name="LockType" value="3">
  <param name="CommandType" value="4">
  <param name="CursorOptions" value="0">
  <param name="CacheSize" value="50">
  <param name="MaxRecords" value="0">
  <param name="BOFAction" value="0">
  <param name="EOFAction" value="0">
  <param name="ConnectStringType" value="1">
  <param name="Appearance" value="1">
  <param name="BackColor" value="-2147483643">
  <param name="ForeColor" value="-2147483640">
  <param name="Orientation" value="0">
  <param name="Enabled" value="-1">
  <param name="Connect" value="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=abrown;Initial Catalog=PDIS;Data Source=Server70;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False">
  <param name="OLEDBString" value="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=abrown;Initial Catalog=PDIS;Data Source=Server70;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False">
  <param name="OLEDBFile" value>
  <param name="DataSourceName" value>
  <param name="OtherAttributes" value>
  <param name="UserName" value>
  <param name="Password" value>
  <param name="RecordSource" value="vb_GetSigList;1">
  <param name="Caption" value="Adodc1">
  <param name="_Version" value="393216">
</object>
</p>
<p>
<object classid="clsid:CDE57A43-8B86-11D0-B3C6-00A0C90AEA82" id="DataGrid1" width="100" height="50">
  <param name="_ExtentX" value="2646">
  <param name="_ExtentY" value="1323">
  <param name="_Version" value="393216">
  <param name="AllowUpdate" value="255">
  <param name="AllowArrows" value="255">
  <param name="Appearance" value="1">
  <param name="BackColor" value="2147483653">
  <param name="BorderStyle" value="1">
  <param name="DefColWidth" value="0">
  <param name="Enabled" value="255">
  <param name="ColumnHeaders" value="255">
  <param name="ForeColor" value="2147483656">
  <param name="HeadLines" value="1">
  <param name="RowHeight" value="15">
  <param name="TabAcrossSplits" value="0">
  <param name="TabAction" value="0">
  <param name="WrapCellPointer" value="0">
  <param name="RowDividerStyle" value="2">
  <param name="FormatLocked" value="0">
  <param name="AllowAddNew" value="0">
  <param name="AllowDelete" value="0">
  <param name="RightToLeft" value="0">
  <param name="DataMember" value>
  <param name="Caption" value>
  <param name="ColumnCount" value="2">
  <param name="SplitCount" value="1">
  <param name="DataSource" value="ADOdc1">
</object>
</p>

</body>

</html>
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6249641
I'm afraid I'm not much of an ActiveX genius....how about we get some VB people in here to help out??
0
 
LVL 20

Expert Comment

by:hes
ID: 6249774
Ok first off it is not you it is IE's security. Those controls are licensed for vb but IE does not recognise that.

I had the same problem when I first tried to use a msflexgrid in html.
Try the following:

VB activeX controls are licensed for the development box only. IE's license manager will not display
a unlicensed control. You have to create a .LPK file from the tool
lpk_tool.exe located on the vb install cd under common/tools/vb/lpk, then install that file on the server
running the htmp page and add the following code to the html page
<object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"   width="50" height="50">
   <param name="LPKPath" value="FileName.lpk">
 </object>


FileName.lpk is the path and name of the lpk file you created, path relative to where the html page
is stored.

0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6249816
Hi hes...thanks for stopping by!

Wow is that ever over my head!  I have no idea what you are talking about.  I hope cube is better off than I am.
0
 
LVL 20

Accepted Solution

by:
hes earned 200 total points
ID: 6249839
Classy,
Maybe this will help

README file for the License Package Authoring Tool - LPK_TOOL.EXE
=================================================================

Description
===========

The License Package Authoring Tool (LPK) allows you to author an
LPK file.

An HTML Page with licensed controls requires a single associated
license package which stores the run-time licenses for all the
controls used on the page. The HTML page should point to a license
package via a relative URL. This tool allows you to author a
license package file.

For more information on Licensing, please refer to the following
document.

Title: Online Licensing of ActiveX controls.


Using LPK_TOOL
==============

LPK_TOOL displays two list boxes.

Available Controls List Box
===========================
The first list box, "Available Controls", lists all controls registered
in your system.

Contorls in License Package List Box
====================================
The second list box, "Controls in License Package", lists all
controls, whose licensing information, if available, will be stored in
the LPK file. The Licensing information will be save when you invoke
the 'Save & Exit' button.

Add Button
==========
You can select 'controls' in the 'Available Control List Box' and
use the 'Add' button to instruct the tool to add it to the LPK file.
LPK_TOOL will respond by moving the selected controls to the "Controls
in License Package" List Box.

Remove Button
=============
You can select 'controls' in the 'Controls in License Package List Box'
and use the 'Remove' button to instruct the tool not to add it to the
LPK file. The LPK_TOOL will respond by moving the selected controls
to the 'Available Control List Box'.

Save & Exit Button
==================
The 'Save & Exit' button will instruct the tool to save the licensing
information to the LPK file. LPK_TOOL will prompt for a file name and
save the Licensing information in the file name provided. LPK_TOOL will
terminate after saving the file.

Cancel Button
=============
The 'Cancel Button' will terminate the application without creating the  
LPK file.

About Button
=============
The 'About Button' will display the version information.

Help Button
===========
The 'Help Button' will dislay the help file for the tool.

Show only Controls that support Licensing Check Box
===================================================
When checked, LPK_TOOL will display only those controls, which support
Licenses (IClassFactory2) interface.

Note:
=====
This tool makes use of the License Manager components. Please make
sure the License Manager is installed on your system and registered
before you use this tool.
     
< end of document>
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6249840
I think you need a sort of vbscript on your web page to manage properties and events of those controls.
0
 

Author Comment

by:cube
ID: 6249886
I am familiar with the LPK_TOOL, and used it for the VB version of this project.  I don't think that's my problem here, because when I open the HTML page in IE, the objects are visible, just grayed out.  I thought if it was a license issue, IE didn't even show the object.

But, just to be sure I tried it.  I created a license file containing the Microsoft ADO Data Control and the Microsoft Data Grid Control.  Then I added the following lines to the HTML I posted above:

<OBJECT CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331">
     <PARAM NAME="LPKPath" VALUE="new_page_1.LPK">
</OBJECT>

There was no difference in the behavior.  It's days like this that make me want to go flip burgers - heck, I probably couldn't even figure out to do that on a day like this.


0
 
LVL 5

Expert Comment

by:dgorin
ID: 6253423
Where is the SQL database you're trying to connect to?  It would have to be on the client computer for your code to work, it seems to me.

I have never tried embedding an ADODC in a web page, is this a control that should work in this environment?
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6264851
No luck cube??
0
 
LVL 15

Expert Comment

by:robbert
ID: 6266409
I didn't get into this, deeply, so just my 0.02:
+ Both objects are signed to be safe for scripting, for whatever reason.
+ For me (VB installed), they were not grayed out.
+ For me, the database connection didn't work but I didn't try to get into that.
+ For whatever reason, on the web, mostly the Sheridan grid is used (a demo version even ships with the MS ADODB SDK samples), although it's not free.
0
 
LVL 7

Expert Comment

by:ClassyLinks
ID: 6284176
cube...can you come back and tell us if any of this has helped, or if you are any further ahead???

Thanks
0
 

Author Comment

by:cube
ID: 6287663

Sorry for my silence, but I've been out of the office for a week and a half.  
I have resolved the original issue.  I switched over to Microsoft InterDev to see if I could get better results out of it.  The following code works just fine in InterDev:

<HTML>
<BODY>

<!-- ADO Data Control -->
<OBJECT ID = "ADODC"
CLASSID = "clsid:67397AA3-7FB1-11D0-B148-00A0C922E820"
WIDTH = 400
HEIGHT = 10
>
</OBJECT>

<OBJECT CLASSID="clsid:CDE57A43-8B86-11D0-B3C6-00A0C90AEA82" id=DataGrid1
WIDTH = 400
HEIGHT = 300
>
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
<!--

SUB Window_OnLoad()
     ADODC.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=abrown;Initial Catalog=PDIS;Data Source=Server70;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=EN1964J;Use Encryption for Data=False;Tag with column collation when possible=False"
     ADODC.CommandType = 4
     ADODC.RecordSource = "vb_getsiglist;1"
     Set DataGrid1.DataSource = ADODC
     ADODC.Refresh
END SUB

-->
</SCRIPT>
</BODY>
</HTML>

Actually, it works just fine when viewed using the InterDev preview feature.  When I save it and take it to a test machine, the ADO Data Control chokes and says it doesn't have the a ConnectionString property.  

So I just need to get past that & I'm off to the races.

Thanks for all the help!
0
 

Author Comment

by:cube
ID: 6287672
While this answer didn't directly solve my problem, it prompted me to switch over to broaden my search for a solution.
0
 
LVL 20

Expert Comment

by:hes
ID: 6287761
Try using this for your recordset

' Datagrid1 is the id of the Datagrid control
' ADODC is the id of the ADO Data Control
Set Datagrid1.DataSource = ADODC.Recordset
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

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 gather data from news site 6 52
google maps v3 custom icon 9 157
Laravel 5.1 + lucadegasperi/oauth2-server-laravel 3 505
HTML Editor to Choose? (2015) 13 85
When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

733 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