Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
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 - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: ConnectionStrings
Duncan Cook
Posts: 164
 
ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 6:27 AM
fiogf49gjkf0d
Does any one know the correct connection string to be added to "connectionStrings" in the web.config file

I can get this to work fine as a SQLOLEDB as below

<add name="SLXConnectionString" connectionString="Data Source=127.0.0.1;Initial Catalog=E1-Metis;User ID=sysdba; Password=masterkey;"
providerName="System.Data.OLEDB" />

but the Connection String below doesn't work

<add name="SLXConnectionString" connectionString="Data Source=127.0.0.1;Initial Catalog=E1-Metis;User Id=Adminassword=''ersist Security Info=True;Extended Properties='Port=1706;Log=On'"
providerName="SLXOLEDB" />

Any ideas what it should be?
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 7:47 AM
fiogf49gjkf0d
try this.......

assword=ersist Security Info=False;User ID=admin;Initial Catalog=slxacp;Data Source=CRMX01;Extended Properties=PORT=1706;LOG=ON">

I have VS2003 apps running with this key...

Also did you install the provider in the webserver you are going to use this?
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 7:47 AM
fiogf49gjkf0d
Somehow the initial part of the key is getting stripped off for some reason.So i have put some invalid chars in there.Hope this time it works!

take out the 1 before the add key and replace the smileys with a "semicolonP"


<1add key = "SLXConnection" value="Provider=SLXOLEDB.1assword=ersist Security Info=False;User ID=admin;Initial Catalog=slxacp;Data Source=CRMX01;Extended Properties=PORT=1706;LOG=ON">


[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 9:12 AM
fiogf49gjkf0d
Thanks Nadu but I have exactly that running as an appSetting "Key" and that works fine, as shown below.

<appSettings>
<add key="ConnectionString" value="Provider=SLXOLEDB.1;Data Source=127.0.0.1;Initial Catalog=E1-Metis;User Id=Adminassword=''ersist Security Info=True;Extended Properties='Port=1706;Log=On'" />
</appSettings>

However I need to use a connectionString instead of an appSetting (as i'm using a SqlDataSource with a formview) and that where I have a problem, the below is an example of a connectionString for SQL OLEDB, but when try a SLX OLEDB connection string thats when I get a problem

<connectionStrings>
<add name="SLXConnectionString" connectionString="Data Source=127.0.0.1;Initial Catalog=E1-Metis;User ID=sysdba; Password=masterkey;"
providerName="System.Data.OLEDB" />
</connectionStrings>
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 9:14 AM
fiogf49gjkf0d
Actually I wonder if its the type of Data source I'm using, at the moment I'm using a SQLDataSource...... I wonder if this should be an ObjectDataSource?
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 9:32 AM
fiogf49gjkf0d
no its not the ObjectDataSource as thats used for business objects.

I did manage to get this work, which was just slightly diffrent to my first effort.

<add name="SLXOLEDBConnection" connectionString="Provider=SLXOLEDB.1;Data Source=E1-webv623ersist Security Info=True;User ID=admin;Initial Catalog=E1-METIS;Location=127.0.0.1"
providerName="System.Data.OleDb" />

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 10:59 AM
fiogf49gjkf0d
Sorry for chiming in late here. It looks like you've figured this out already, but the "providerName" refers to the .NET Data Provider to use, not the OLEDB provider name. For SLX, you'll always use the System.Data.OleDb data provider and then specify the SLX OLEDB Provider in the actual connection string.
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 11:02 AM
fiogf49gjkf0d
Good that you got it working.

I havent used the SQLDATACONTROL anyway.....
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 11:07 AM
fiogf49gjkf0d
Hi Nandu, you don't need to use the SQLDataSourse control, but as I'm using a FormView I do, and it seems you can only use ConectionStrings for this and not AppSetting Keys.

Thanks for you help
--
Duncan
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 11:10 AM
fiogf49gjkf0d
Thanks Ryan, the providerName was confusing as you need to set the SLX provider name in the connection string and then another OLEDB provider as the provider name.

I remember on a previous post or blog you wrote, you mention being able to impersonate a user in the connection string can you let me know how you do that?

Many Thanks
--
Duncan
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 11:16 AM
fiogf49gjkf0d
Quote:
Originally posted by Duncan Cook

I remember on a previous post or blog you wrote, you mention being able to impersonate a user in the connection string can you let me know how you do that?


Basically you just add a name-value pair to the extended properties (See http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=55) If I wanted to impersonate the user "lee", I would simply add "impersonate=lee" in the extended properties of the connection string (Assuming "lee" is a valid SLX username). Then I get lee's security in all my queries etc, but I don't need to know lee's password (AFAIK you have to log in as admin to impersonate - meaning you supply admin's username & password in the connection string, but add the impersonate value in the extended properties)
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 11:39 AM
fiogf49gjkf0d
yes, we cannot use the appsettings for this...I agree.Mine was taken from a vs2003 setup for slx .Sorry
!
Now i understand that with 2005 things have changed!!

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
ConnectionString="<%$ ConnectionStrings:Connection_String %>"
SelectCommand="SELECT * FROM [Customers]">
</asp:SqlDataSource>


and this in your web.config files

<connectionStrings> 
<add name="Connection_String" connectionString="Data
Source=localhost; DataSource=pubs; User ID=sa; Password=admin;"

providerName="System.Data.SqlClient"></add>
</connectionStrings>


I also happen to read something on these new controls

See this ...

http://www.theserverside.net/news/thread.tss?thread_id=29919
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 11:40 AM
fiogf49gjkf0d
Thanks Ryan, I knew I'd seen it somewhere.

So is there a way to append to my connection string.
For example if I'm calling my app via url like so "../myapp.aspx?userid=lee" can I then use this to append to the connection string?
[Reply][Quote]
Duncan Cook
Posts: 164
 
Re: ConnectionStringsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 06 12:01 PM
fiogf49gjkf0d
Nandu, this is an excellent article.
For us there are two reasons to use ASP.NET, one its Richer and two it’s faster to write.

Using the SQLDataSource with a formView is the fastest way to build a detail view for adding/updating and deleting.
Creating a well structured architecture which separates the User Interface from the Business Logic (For the application we are creating) wouldn't offer us anything in the short, medium or long term, so why do it? I think like most things you have to weigh it up on a case by case basis and not have a blanket approach to building applications.
[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 © 2024 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): 11/22/2024 4:03:07 PM