NOTE: The Microsoft SQL Server connector is supported on Mono starting with MindTouch 9.02.2.  Prior versions require MindTouch to run on Microsoft Windows with Microsoft .NET 2.0 or later.

Vendor MindTouch
Type Extension
Categories Database
Requires MindTouch 8.08 or later
OS Restriction Microsoft Windows Server 2003/2008 or Vista
Status Stable
License Standard/Enterprise
SID (service id) sid://mindtouch.com/std/2008/06/microsoft.sqlserver
Assembly mindtouch.sqlserver

 

Table of Contents

Description

This extension contains functions for displaying data from Microsoft SQL databases.

See also How to add an extension, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.

Configuration:

Before the Microsoft SQL extension can be used, it must be configured with the access information to the database.

Config Key Description
db-server Optional. Database hostname or IP address. (default: "localhost")
db-catalog Database name.
db-user Database user name. (IMPORTANT: make sure user has read-only access!)
db-password Password for database user.
db-options Optional.  Connection string parameters. (default: none)

If you need to configure multiple databases for the same wiki, register this extension once for each database.  Use the following preference to specify a unique namespace value for each registration.  Invoke the service using this value instead of sql.  For example, if you set namespace=mydb1, you would invoke the service with mydb1.table("...") instead of sql.table("...").

Preference Description
namespace Specifies a custom namespace (default: sql)

 


Sql.Table(query : str) : xml

Show results of a SELECT query in a sortable table.

Parameters:

Name Type Description
query str SELECT query.

Samples:

     Output

To embed a SELECT query that displays a list of all users in the users table:

{{ sql.table("SELECT user_name as Name, user_email as Email FROM users")  }} 
./MySql1.JPG

Sql.Value(query : str) : xml

Show single value from a SELECT query.

Parameters:

Name Type Description
query str SELECT query.

    


Sql.List(query : str, column : str) : xml

Collect rows as a list from a SELECT query.

Parameters:

Name Type Description
query str SELECT query.
column str Optional. Column name. (default: first column)

    


Sql.Record(query : str) : map

Collect all columns from a SELECT query.

Parameters:

Name Type Description
query str SELECT query.

    


Sql.RecordList(query : str) : list

Collect all columns and all rows from a SELECT query.

Parameters:

Name Type Description
query str SELECT query.

   

   

Tag page
Viewing 3 of 3 comments: view all
Hi

I get the following error:
MS SQL could not be restarted (where MS SQL is the name of the service)

and if I click "Show full report" i get the following:
Array
(
[title] => 500 Error
[message] =>
[response] => Request URI:
http://localhost:8081/deki/site/services/12/start?dream.out.format=php&dream.in.host=10.0.134.241&dream.in.scheme=http&dream.in.origin=10.2.1.96

Server response:
Array
(
[exception] => Array
(
[message] => unable to initialize service (invalid service-license)
[source] => mindtouch.dream
[stacktrace] => Array
(
[frame] => Array
(
[0] => MindTouch.Dream.DreamService+<CreateServiceAsync_Helper>d__19.MoveNext () [0x00000]
[1] => MindTouch.Dream.Coroutine.Iterate_Helper (IEnumerator`1 coroutine, MindTouch.Dream.TaskBehavior behavior) [0x00000]
[2] => System.VoidClosure`2[System.Collections.Generic.IEnumerator`1[MindTouch.Dream.IYield],MindTouch.Dream.TaskBehavior].Closure () [0x00000]
[3] => MindTouch.Dream.Task.Execute (System.VoidHandler handler, MindTouch.Dream.TaskBehavior behavior) [0x00000]
)

)

[type] => System.Exception
)

)

)

Can anyone help me?? edited 09:16, 17 Sep 2008
Posted 09:16, 17 Sep 2008
I received the same error message. I am running open source. Does this extension require Enterprise Edition?
Posted 01:52, 12 Oct 2008
Yes, it does.
Posted 19:31, 14 Nov 2008
Viewing 3 of 3 comments: view all
You must login to post a comment.