ActiveWidgets with SQL Server

can i use the ActiveWidgets to display my data from the table in SQL server or can i connect ActiveWidgets to any other database and display the data in grid?
Anyone please help!!
Thank you very much
December 23,
Yes, you can. But you need either a server side script to query the database. ActiveWidgets is strictly a client side script.

I found I can easily dump a query result set into the Grid using ColdFusion and MySQL. Using SQL Server would be just as easy.
Don Smith
January 5,
Thank you Don Smith!
can you give me some guide on how to dump a query result set into the Grid? i am using the JSP.

Thank you
January 19,
Create a client-side javascript array which contains the data returned from your query to the database.
January 26,
I believe Gemini has the same problem as I do. I know how to do that using VBScript, but I'm puzzled about doing it with JS. So, I think that a little bit of source code will be appreciated.


January 27,
See http://www.activewidgets.com/documentation/tutorial/grid/data-xmlsimple.htm . This retrieves an XML document from the web server. In your server-side code, simply query the sql server and return an XML document. You could basically just copy the javascript that exists in that example and change appropriately to point to your server-side page that retrieves the data from the server.

We actually don't even bother with creating an XMLDoc, we simply simply return a dataset through a web service (ASP.NEt and c#) and then use XPath to appropriately refer to the fields.
Alex (not ActiveWidgets)
January 27,
the link isn't there?
March 18,
Here is the simplest example to get you started. You just need to change the ODBC connection and table information to match yours.

<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
body, html {margin:0px; padding: 0px; overflow: hidden;font: menu;border: none;} </style>
<link href="../../runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="../../runtime/lib/grid.js"></script>
<!-- #INCLUDE FILE="activewidgets.asp" -->

Dim oConnection, oRecordset
Set oConnection = Server.CreateObject("ADODB.Connection")
oConnection.Open "IntranetSQL"
Set oRecordset = oConnection.Execute("SELECT * FROM Employees")

Response.write(activewidgets_grid("obj", oRecordset))

'Alternate method via recordset
'do while not oRecordset.eof
'str = str & oRecordset("FirstName") & "," & oRecordset("LastName") & vbCrlf

Set oRecordset = nothing
Set oConnection = nothing

August 26,
Does anyone know what the "include" file he is putting in the above example?
November 11,

This topic is archived.

See also:

Back to support forum