BaBernd
7th September 2015, 18:00
Hello to All,
is it possible to make a Connection to an external data source out of a Report script? For example to a Microsoft SQL Server data source?
If yes, how can I do that?
Best Regards
Bernd
bhushanchanda
8th September 2015, 07:18
Hi,
What are you looking for? If you just want to get data from some other data source, you can create one SQL script and execute it from report script. The SQL script can create a csv file with the output data which you can read from your report script. One more option is to create a SSIS job which will extract data based on the query and store it into a CSV file.
BaBernd
8th September 2015, 09:49
Hi Bhushan,
yes I want to get data from another data source. And for that I Need to know how to make a Connection to that data source before getting the data by SQL-Select or within the SQL-Select. Are there Special commands?
I don't want to handle it with CSV-files. I want to get direct Access to the database.
Best Regards
Bernd
bhushanchanda
8th September 2015, 10:58
Hi,
I don't think there is a direct way of connecting to a database from Baan/LN. You will need to have an intermediate program to do the job. As said, you can use sqlcmd to connect and query the required database.
Baan/LN function run.prog() can help you issue this command directly from report script.
Here's a nice example Executing SQL Command from command prompt. (http://www.codeproject.com/Tips/319460/Execute-SQL-Query-SQL-Command-Using-Command-Prompt)
BaBernd
8th September 2015, 11:25
Hello Bhushan,
thanks for that excellent link. I will check my possibilities.
Best Regards
Bernd