[Mono-list] ANN: Microsoft SQL Server and SQL#
Daniel Morgan
danmorg@sc.rr.com
Fri, 1 Nov 2002 09:35:59 -0500
Hello
Tim Coleman has got the System.Data.SqlClient provider (Microsoft SQL Server
7/2000) to retrieve data now. It even works in Mono's SQL query tool SQL#.
The bits were committed to cvs
Here is the output from running SQL# using the SqlClient provider connected
to a Microsoft SQL Server 2000 database. Much Thanks goes to the FreeTDS
and jTDS project teams for their assistance and free access to their code.
We could not have done it without the valuable research that the FreeTDS and
jTDS teams have done.
This SqlClient provider works on Linux and Windows.
DanielMorgan@DANPC ~/mono/mcs/tools/SqlSharp
$ mono SqlSharpCli.exe
Welcome to SQL#. The interactive SQL command-line client
for Mono.Data. See http://www.go-mono.com/ for more details.
Type: \Q to quit
\ConnectionString to set the ConnectionString
\Provider to set the Provider:
{OleDb,SqlClient,MySql,Odbc,
Oracle,PostgreSql,Sqlite,Sybase,Tds)
\Open to open the connection
\Close to close the connection
\Execute to execute SQL command(s)/queries(s)
\h to show this help.
\defaults to show default variables.
Provider is not set.
ConnectionString is not set.
SQL# \provider sqlclient
The default Provider is SQLCLIENT
SQL# \connectionstring Server=localhost;Database=pubs;User
ID=danmorg;Password=f
reetds
SQL# \open
Attempt to open connection...
Open was successfull.
SQL# select * from employee
SQL# \e
Execute SQL: select * from employee
Display any result sets...
Display the result set 1
Fields in Query Result: 8
emp_id fname minit lname job_id
job_l
vl pub_id hire_date
========= ==================== ===== ============================== ======
=====
== ====== ===================
PMA42628M Paolo M Accorti 13
35 0877 1992-08-27 00:00:00
PSA89086M Pedro S Afonso 14
89 1389 1990-12-24 00:00:00
VPA30890F Victoria P Ashworth 6
1
40 0877 1990-09-13 00:00:00
H-B39728F Helen Bennett 12
35 0877 1989-09-21 00:00:00
L-B31947F Lesley Brown 7
1
20 0877 1991-02-13 00:00:00
F-C16315M Francisco Chang 4
2
27 9952 1990-11-03 00:00:00
PTC11962M Philip T Cramer 2
2
15 9952 1989-11-11 00:00:00
A-C71970F Aria Cruz 10
87 1389 1991-10-26 00:00:00
AMD15433F Ann M Devon 3
2
00 9952 1991-07-16 00:00:00
ARD36773F Anabela R Domingues 8
1
00 0877 1993-01-27 00:00:00
PHF38899M Peter H Franken 10
75 0877 1992-05-17 00:00:00
PXH22250M Paul X Henriot 5
1
59 0877 1993-08-19 00:00:00
CFH28514M Carlos F Hernadez 5
2
11 9999 1989-04-21 00:00:00
PDI47470M Palle D Ibsen 7
1
95 0736 1993-05-09 00:00:00
KJJ92907F Karla J Jablonski 9
1
70 9999 1994-03-11 00:00:00
KFJ64308F Karin F Josephs 14
1
00 0736 1992-10-17 00:00:00
MGK44605M Matti G Karttunen 6
2
20 0736 1994-05-01 00:00:00
POK93028M Pirkko O Koskitalo 10
80 9999 1993-11-29 00:00:00
JYL26161F Janine Y Labrune 5
1
72 9901 1991-05-26 00:00:00
M-L67958F Maria Larsson 7
1
35 1389 1992-03-27 00:00:00
Y-L77953M Yoshi Latimer 12
32 1389 1989-06-11 00:00:00
LAL21447M Laurence A Lebihan 5
1
75 0736 1990-06-03 00:00:00
ENL44273F Elizabeth N Lincoln 14
35 0877 1990-07-24 00:00:00
PCM98509F Patricia C McKenna 11
1
50 9999 1989-08-01 00:00:00
R-M53550M Roland Mendel 11
1
50 0736 1991-09-05 00:00:00
RBM23061F Rita B Muller 5
1
98 1622 1993-10-09 00:00:00
HAN90777M Helvetius A Nagy 7
1
20 9999 1993-03-19 00:00:00
TPO55093M Timothy P O'Rourke 13
1
00 0736 1988-06-19 00:00:00
SKO22412M Sven K Ottlieb 5
1
50 1389 1991-04-05 00:00:00
MAP77183M Miguel A Paolino 11
1
12 1389 1992-12-07 00:00:00
PSP68661F Paula S Parente 8
1
25 1389 1994-01-19 00:00:00
M-P91209M Manuel Pereira 8
1
01 9999 1989-01-09 00:00:00
MJP25939M Maria J Pontes 5
2
46 1756 1989-03-01 00:00:00
M-R38834F Martine Rance 9
75 0877 1992-02-05 00:00:00
DWR65030M Diego W Roel 6
1
92 1389 1991-12-16 00:00:00
A-R89858F Annette Roulet 6
1
52 9999 1990-02-21 00:00:00
MMS49649F Mary M Saveley 8
1
75 0736 1993-06-29 00:00:00
CGS88322F Carine G Schmitt 13
64 1389 1992-07-07 00:00:00
MAS70474F Margaret A Smith 9
78 1389 1988-09-29 00:00:00
HAS54740M Howard A Snyder 12
1
00 0736 1988-11-19 00:00:00
MFS52347M Martin F Sommer 10
1
65 0736 1990-04-13 00:00:00
GHT50241M Gary H Thomas 9
1
70 0736 1988-08-09 00:00:00
DBT39435M Daniel B Tonini 11
75 0877 1990-01-01 00:00:00
Rows retrieved: 43
SQL#