Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, June 30, 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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Connecting to other database (Connection strng)
jan
Posts: 2
 
Connecting to other database (Connection strng)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 May 10 8:53 PM
hi everyone. I have to connect to a external database i have the code right but when i run it gives me an error that it is not a trusted connection. here's my code. i already added the required DLL's.


using System;
using Sage.Entity.Interfaces;
using Sage.Form.Interfaces;
using System.Data;
using System.Data.SqlClient;


namespace Sage.BusinessRules.CodeSnippets
{
public static partial class AccountBusinessRules
{
public static void InsertAccountStep( IAccount account)
{

// TODO: Complete business rule implementation
//Sage.Entity.Interfaces.IAccount Acct = BindingSource.Current as Sage.Entity.Interfaces.IAccount;
string sCon = "Integrated Security=SSPIersist Security Info=False;Initial Catalog=Marsman;Data Source=svr-dev1";
SqlConnection myCon = new SqlConnection(sCon);
myCon.Open();
string sComGetClientId = "select max(clientno) from m_Client";
//SqlCommand myCom = new SqlCommand(sCom, myCon);
SqlDataAdapter myDA = new SqlDataAdapter(sComGetClientId, myCon);
DataSet dsClientId = new DataSet();
myDA.Fill(dsClientId);

string sClientId = dsClientId.Tables[0].Rows[0][0].ToString();
double dblClientId = double.Parse(sClientId);
dblClientId = dblClientId + 1;


sClientId = dblClientId.ToString();
account.CClientId = sClientId;



}
}
}
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Connecting to other database (Connection strng)Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Jun 10 6:36 AM
Obviously something wrong with your connection string. Is the SQL server on a different machine? I would use a username and login specifically to log into an external database. Remember SLX will likely be running as a "webdll" user so they would have to be a user in your database to use SSPI.
[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): 6/30/2025 5:19:46 AM