Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 8, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Datagrid connect to data store in other db
20pippo05
Posts: 46
 
Datagrid connect to data store in other dbYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 10 10:06 AM
I want to create a datagrid with display data stored in other db. I can to link an another db for memory into recordset but i don't can view in a datagrid.

EXAMPLE:

datagrid1.ConnectionString="Provider=SQLOLEDB.1"&"Initial Catalog=mep19;"&"Data Source=(local);User ID=DBA;"&"Password=sqlsql "
ssql="Select orpa_c_cli_for from flusso_orpa'"
datagrid1.sql = ssql
datagrid1.Refresh

but what i do in datagrid.columns?? i don't view data.


EXAMPLE TO CONNECT (the code function correctly) :

Set sconn=CreateObject("ADODB.Connection")
conn="Provider=SQLOLEDB.1"&"Initial Catalog=mep19;"&"Data Source=(local);User_ ID=DBA;"&"Password=sqlsql "
sconn.Open conn
Set objSLXDB= New SLX_DB
Set objRS=objSLXDB.GetNewRecordSet
objRS.Open "Select orpa_c_cli_for from flusso_orpa ",conn
objRS.MoveFirst
msgbox objRS.fields(0)

[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Datagrid connect to data store in other dbYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 10 3:40 PM
Why not put a view of the other db in your SLX database (owned by sysdba) and use that directly?

If for some reason that is not workable, this line looks suspect:

datagrid1.ConnectionString="Provider=SQLOLEDB.1"&"Initial Catalog=mep19;"&"Data Source=(local);User ID=DBA;"&"Password=sqlsql "

There are no variables here, so why are you concatenating everything using &? Why not just write it as one long string?
[Reply][Quote]
20pippo05
Posts: 46
 
Re: Datagrid connect to data store in other dbYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Feb 10 4:11 AM
because the other db is db2 and i don't can to put view into SLX database.
For the string you have reason but the problem is another.
How can to put view in SLX database? I think to use server linked in SQL Server but i don't, can to link.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Datagrid connect to data store in other dbYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Feb 10 4:59 AM
If you can create a linked server you can probably do this - sounds like you might need some help from your DBA, who will also help you with the syntax for creating the view ...
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/8/2025 7:28:33 AM