Hendrik,
try this:
Dim szCmd, szFile As String
szCmd = "Select * From dbo.Geodata Where (Col1 = '0815') or (Col2 = '0815')"
szFile = "D:\Temp\Sampledata.TAB"
Server hdbc Link Table
szCmd
Toolkit "ODBC"
into "SampleData"
File szFile
I don't always use the """ around the table/column/owner names. Maybe that will
give me a hard time sometime, who knows
If you need those you could use this command string:
szCmd = "Select * From """dbo"""."""Geodata""" Where (Col1 = '0815') or (Col2 =
'0815')"
HTH,
Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk/gis
-----Original Message-----
From: Possberg, Hendrik [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 21, 2005 6:08 PM
To: Mapinfo-List (E-Mail) (E-Mail)
Subject: MI-L Download Data from Server
Dear list,
I am looking for a way to download data from a Server table, like it is
possible
using the "open DBMS table" - but I want to run it inside a Mapbasic script. I
tried to use the "Server Link Table statement" but did not get further. The
Server Connection is established.
Server name is : Win004
User is "dbo"
Server table name is: "Geodata"
Connectionname "mic_Geodat"
Destination table should be : "SampleData"
path of the Destination table should be "D:\Temp"
the criteria should be: where Col1 = "0815" or Col2 ="0815"
I thought, i could build and run a Sqlstring because the values for Col1/col2
should vary from tim to time.
This is my idea:
Server hdbc Link Table
s0Cmd = "Select *From ""mic_Geodat"".""dbo"".""Geodata"" Where (Col1 =
""0815"") or (Col2 = ""0815"") into ""SampleData"" File ""D:\Temp
\Sampledata.TAB"
run Command s0Cmd
The problem is that I always get compling errors meaning that the string is not
ok.
Any help would be appreciated.
Mit freundlichen Gr��en
microm
Micromarketing-Systeme und Consult GmbH
Hendrik Po�berg
Manager Geodaten
Hellersbergstr. 14
41460 Neuss
Phone: 02131-10 97 51
Fax: 02131-10 97 77
mailto:[EMAIL PROTECTED]
***
Aktuelles:
Abonnieren Sie kostenlos das aktuelle microMagazin. In jedem Quartal aktuelle
Informationen �ber die neuesten Entwicklungen bei microm, unseren Partnern und
Kunden. Einfach online bestellen unter www.microm-online.de!
***
___________________________________________
Diese Nachricht wurde elektronisch versandt und ist daher auch ohne
Unterschrift rechtsgueltig. Der Inhalt dieser E-Mail enth�lt vertrauliche
Informationen. Das Kopieren und die Weitergabe an Dritte ist nicht gestattet.
Sollten Sie diese E-Mail irrtuemlich von uns erhalten haben, bitten wir Sie,
diese zu vernichten und uns darueber zu informieren. Im Voraus vielen Dank.
____________________________________________
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com | To
unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16175