Getting The List Of Connection Strings To Display In The SqlDataSource Wizard

May 15, 2007

I've added an SqlDataSource control to my web page and selected "Configure Data Source" on it.  This brings up a "Choose Your Data Connection" wizard, and it asks you to select from a dropdown list of presumably pre-existing connection strings in my web.config file.  However none of my connection strings will display in that dropdown list.  The only thing i can do is hit the "Create New Connection" button and this adds yet another connection string to my web.config file.
 
I've already ran through the wizard once, created a new connection string, but when i run through the wizard again, even the new connection string - the one created by the last wizard will not appear in the dropdown list.
 Any suggestions?
 
Jason
 

View 3 Replies


ADVERTISEMENT

SSIS Export Wizard - Tmp Files And Connection Strings

Aug 15, 2006

Hi,

I have used the SSIS import/export wizard to create a transfer from one database to another.

Q1: Why are some files from this wizard stored in the the temp folder ?

Example: C:Documents and SettingspbhLocal SettingsTemp

This is extreemly unuseful when checking in the solution in tfs since these files will not be saved.

Q2: I have tried to move these files and manually edit the location for these file references in the dtsx package file. However: The connection string wants an absolute path for the files..

Example:

DTS:Name="ConnectionString">c: mp1EA.tmp

How can I refer to $project$ mp1ea.tmp, a relative path to the project directory instead?

Regards,

Pål

View 3 Replies View Related

SQLDataSource With Query Strings

Mar 16, 2007

Hi, I have a SQLDataSource binding to a GridView and can come to the page either with or without a query string attached:
 /ProjectManagement/reporting/project.aspx
/ProjectManagement/reporting/project.aspx?portfolio=3
When it comes with a query string, I can see in SQL Server profiler it executes and I get all the right data. When it is an empty string, or with no "?portfolio=" on it, it won't even execute against SQL server. Any ideas?
<asp:GridView ID="grid" runat="server" Width="600px"
ShowHeader="false"
AutoGenerateColumns="false"
DataSourceID="DSportfolio"
AllowSorting = "true"
AllowPaging = "true">
<Columns>
<asp:TemplateField>
<ItemTemplate>
 .............
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="DSportfolio" ConnectionString="<%$ AppSettings:SQLConnection1 %>"
SelectCommand="uspSELECT_PROJECT"
SelectCommandType="StoredProcedure"
runat="server">
<SelectParameters>
<asp:QueryStringParameter Name="p_PORTFOLIOID" QueryStringField="portfolio" />
</SelectParameters>
</asp:SqlDataSource>
Thanks,
James

View 2 Replies View Related

SqlDataSource Wizard

Apr 23, 2008

Can anyone think of a reason for whilst configuring my SqlDataSource using the wizard in VS2005, when I click Advanced the Generate Insert, Update  and Delete Statements option is greyed out. Been using them plenty of times already elsewhere in the site, yet for no apparent reason it won't work on a couple of pages.

View 3 Replies View Related

List Of Strings Passed Into A Parameter

Oct 18, 2006

I am trying to pass multiple values as parameters into my update command:UPDATE tblUserDetails SET DeploymentNameID = 102 WHERE ((EmployeeNumber IN (@selectedusersparam)));I develop my parameter (@selectedusersparam) using the following subroutine: Private Sub btnAddUsersToDeployment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddUsersToDeployment.ClickDim iVal As Integer = 0Dim SelectedCollection As StringSelectedCollection = ""If (lsbUsersAvail.Items).Count > 1 ThenFor iVal = 0 To lsbUsersAvail.Items.Count - 1If lsbUsersAvail.Items(iVal).Selected = True ThenSelectedCollection = SelectedCollection & "," & lsbUsersAvail.Items(iVal).ValueEnd IfNextSelectedCollection = Mid(SelectedCollection, 2, Len(SelectedCollection))Session.Item("SelectedCollectionSession") = SelectedCollectionSqlDataSource4.Update()ltlUsersMessage.Text = String.Empty 'UPDATE tblUserDetails SET DeploymentNameID = @DeploymentNameIDparam WHERE (EmployeeNumber IN (@selectedusersparam))'SqlDataSource4.UpdateCommand = "UPDATE tblUserDetails SET DeploymentNameID = @DeploymentNameIDparam WHERE (EmployeeNumber IN (" + SelectedCollection + ")"ElseltlUsersMessage.Text = "Select users before adding to deployment. Hold Control for multiselect"End IfEnd SubFor some reason the query does not pass the parameters which are "21077679,22648722,22652940,21080617" into the queryI don't understand why.

View 4 Replies View Related

Connection Strings, Trusted-connection VS Username-password, SQL Server 2005 Express

Mar 9, 2007

All --
Please help.
I have some questions about connection strings.
 
BACKGROUND...

Note that I am using the "SQL Native Client OLE DB Provider", SQL Sever 2005 Express, ASP.NET, C#.NET, and VS.NET 2005.
Note that I do not want to use the "Attach a database file" type of connection string.
Note that I am using the site http://www.ConnectionStrings.com as a reference.
Note that this "Standard security" connection string...<add name="LocalSqlServer" connectionString="Server=MYTESTOFFICESERVERS;Database=MyDatabase;Uid=MyDatabaseUser;Pwd=MyDatabasePassword;" />...does not work and causes the following run-time error...A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
Note that this "Trusted connection" connection string...<add name="LocalSqlServer" connectionString="Server=MYTESTOFFICESERVERS;Database=MyDatabase;Trusted_Connection=yes;" />...works but is less-than ideal because it uses a Trusted Connection rather than a Username/Password combination.
 
QUESTIONS...
(A) What exactly does the error in Item 4 mean?
(B) Do 4 and 5 imply that one must use a Trusted_Connection for all SQL Server 2005 Express connection strings when the database does not reside in the web application's App_Data folder or use a "Attach a database file" type of connection string?
(C) Are there any alternatives?
(D) What do you suggest?
 
Please advise.
Thank you.
-- Mark Kamoski

View 1 Replies View Related

SqlDataSource And Wizard Control

Apr 8, 2008

I have not found anything useful on the Wizard control.  Anything I can find gets to the last step and then just takes the info you supplied and applies them to a bunch of Label.Text's - none that do work. 
So I am building a Wizard control for an HR system that will insert the information into SQL through a SqlDataSource.  The problem is, only the controls that are present in whichever step is currently selected in VWD will appear in the Command and Parameter Editor.
I tried to work around it by selecting the first step, then applying the controls in step 1 within the Parameter Editor, but when I go back to do step 2, it erases everything I just did for step 1.
How do I implement the Wizard with a SqlDataSource?

View 8 Replies View Related

Reporting Services :: Expression To Display Only Strings That Start Report Builder

Oct 7, 2015

How do you write an expression in report builder to only display the results that start with a certain string value..eg.  Project Number - CUP1501, DPR1502, ENG1507 etc.  These values will all get returned but I only want the Project Number that has CUP and DPR in it?

View 2 Replies View Related

SQLDatasource Only Shows Views In Wizard

Sep 19, 2007

hello all... I have a sql2005express database that I am trying to use a sqldatasource control on. I drop the control on to the page and click the configure data source link. I choose a db connection that I have setup previously. on the next step where you are supposed to select the table or view you want to use I only see views, no tables.
I can use the SQL statement option to get data from the table. and I can drag the table from the database explorer window onto the design surface, which will create all of the sql statements (select, insert,update,delete)
 I am using a specific userid to access data but I do not really have any special permissions setup
any help or suggestions would be appreciated. Thanks

View 1 Replies View Related

Sqldatasource Replicating On Insert On A Create User Wizard

Apr 18, 2007

I have a create user wizard.  On the created user event.  I am calling a datasource.insert to insert the email, userid, and opt in to newsletter option into another table.
 For some reason it is inserting the value twice into the database.  I have checked possibilities for why this might be happening.  I am pulling my hair out. 
 Any ideas?
Andrew

View 7 Replies View Related

Trying To Insert Form Info Into Database Using Sqldatasource And Wizard

Jan 7, 2008

Creating custom Register form That inserts user info in to database via storeprocgetting following errorCompilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'ValidateInput' is not a member of 'System.Web.UI.WebControls.TextBox'.

Source Error:


Line 3496: Me.__BuildControlTree(Me)
Line 3497: Me.AddWrappedFileDependencies(Global.ASP.partfrm_aspx.__fileDependencies)
Line 3498: Me.Request.ValidateInput
Line 3499: End Sub
Line 3500:

>.ASPX <asp:Wizard ID="AddParticipantWizard" OnFinishButtonClick="AddParticipant_FinishButtonClick" FinishDestinationPageUrl="~/partReg.aspx" runat="server">
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" Title="Register Participant">
<h3>&nbsp; &nbsp;Register: &nbsp;</h3>
<hr />
<table border="0">

<tr>
<td align="Left" colspan="2">
<h3>
&nbsp; &nbsp;PARTICIPANT INFORMATION: &nbsp;</h3><hr />
Please enter information for the attendee and click 'continue'.</td>

</tr></table>


<table border="0">

<tr>
<td align="right"> Registrant Information&nbsp;&nbsp;
</td>
<td style="width: 232px">
<asp:CheckBox ID="CheckBox1" runat="server" /> Register Me</td>
</tr>

<tr>
<td align="Left" colspan="2">
<table border="0">


<tr>
<td align="right">
<asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="firstname">First Name:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="firstname" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="firstname"
ErrorMessage="First Name is required." ToolTip="First Name is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="lastname">Last Name:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="lastname" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="lastname"
ErrorMessage="Last Name is required." ToolTip="Last Name is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="Email" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr><td style="width: 232px"><br /></td></tr>

<tr>
<td align="right" style="height: 32px">
<asp:Label ID="StreetLabel" runat="server" AssociatedControlID="Street">Street:</asp:Label>
</td>
<td style="width: 232px; height: 32px">
<asp:TextBox ID="Street" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="StreetRequired" runat="server" ControlToValidate="Street"
ErrorMessage="Street is required." ToolTip="Street is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>

</td>
</tr>
<tr><td></td>
<td> <br />
<br /> ".
</td></tr>

<tr>
<td align="right">
<asp:Label ID="CityLabel" runat="server" AssociatedControlID="City">City:</asp:Label>

</td>
<td style="width: 232px">
<asp:TextBox ID="City" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="CityRequired" runat="server" ControlToValidate="City"
ErrorMessage="City is required." ToolTip="City is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>

</td>
</tr>
<tr>
<td align="right">

<asp:Label ID="StateLabel" runat="server" AssociatedControlID="State">State:</asp:Label>

</td>
<td style="width: 232px">

<asp:TextBox ID="State" runat="server" Width="18px">

&nbsp;</asp:TextBox><asp:RequiredFieldValidator ID="StateRequired" runat="server" ControlToValidate="State"
ErrorMessage="State is required." ToolTip="State is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>

</td>
</tr>
<tr><td></td>
<td> <br /> <br /> </td></tr>
<tr><td style="width: 232px"><br /></td></tr>
<tr>
<td align="right">

<asp:Label ID="PostalCodeLabel" runat="server" AssociatedControlID="Zip">Postal/Zip<br />
Code:</asp:Label>
</td>
<td style="width: 232px">

<asp:TextBox ID="PostalCode" runat="server" Width="28px"></asp:TextBox>
<asp:RequiredFieldValidator ID="PostalCodeRequired" runat="server" ControlToValidate="PostalCode"
ErrorMessage="PostalCode is required." ToolTip="PostalCode is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>

</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="OrganizationLabel" runat="server" AssociatedControlID="Organization">Organization:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="Organization" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="OrganizationRequired" runat="server" ControlToValidate="Organization"
ErrorMessage="Organization is required." ToolTip="Organization is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>

</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="TitleLabel" runat="server" AssociatedControlID="Title">Title:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="Title" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="TitleRequired" runat="server" ControlToValidate="Title"
ErrorMessage="Title is required." ToolTip="Title is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>

</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="DepartmentLabel" runat="server" AssociatedControlID="Department">Department:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="Department" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="DepartmentRequired" runat="server" ControlToValidate="Department"
ErrorMessage="Department is required." ToolTip="Department is required." ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="PhoneNumberLabel" runat="server" AssociatedControlID="Phone">Phone Number:</asp:Label>
</td>
<td style="width: 232px">
<asp:TextBox ID="Phone" runat="server" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="PhoneRequired" runat="server" ControlToValidate="Phone"
ErrorMessage="Phone Number is required." ToolTip="Phone Number is required."
ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="RequestLabel" runat="server" AssociatedControlID="Request">Any special request:</asp:Label>
</td>
<td style="width: 232px">(e.g, )

</td>
</tr>
<tr>
<td align="right">
</td>
<td style="width: 232px">
<asp:TextBox ID="Request" runat="server" Width="235px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequestRequiredFieldValidator1" runat="server" ControlToValidate="Request"
ErrorMessage="Request is required." ToolTip="Request is required."
ValidationGroup="AddParticipantWizard">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:RegularExpressionValidator ID="EmailRegExp" runat="server" ControlToValidate="Email"
Display="Dynamic" ErrorMessage="The email format is invalid." ValidationExpression="S+@S+.S+"
ValidationGroup="AddParticipantWizard"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color: red">
<asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
<tr><td></td>
<td align="right">

</td></tr>

</table>
</td>
</tr>
</table>


<asp:SqlDataSource ID="InsertPartDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" InsertCommand="PartInsert" InsertCommandType="StoredProcedure">
<InsertParameters>
<asp:ControlParameter ControlID="firstName" Name="firstName" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="lastName" Name="lastName" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Email" Name="Email" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Street" Name="Street" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="City" Name="City" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="State" Name="State" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="PostalCode" Name="PostalCode" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Organization" Name="Organization" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Title" Name="Title" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Department" Name="Department" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Phone" Name="Phone" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="Request" Name="Request" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="Assistance" Name="Assistance" PropertyName="SelectedValue"
Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" Title="Completion">

<p>
Your account has been successfully created.
</p>
<asp:Button ID="ContinueButton" runat="server" CommandName="Continue"
Text="Continue" />


</asp:WizardStep>
</WizardSteps>
</asp:Wizard>  > CODE-BEHIND 'This event handler fires when the user clicks Finish. We need to insert the new participant record into the database
Protected Sub AddParticipant_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles AddParticipantWizard.FinishButtonClick
'Insert the Participant into the database
InsertPartDataSource.Insert()

'Send the user back to the homepage
Response.Redirect("~/PartReg.aspx")
End Sub

View 1 Replies View Related

Display Of SqlDataSource

Mar 5, 2006

 I'm trying to follow along with lesson07 Web Development Express series and when I drag the SqlDataSource tool onto my form I do not see the object on the screen.  I therefore can not configure it until I have placed GridView object onto my form. I hope you can help me in how to view the SqlDataSource or inform me where I can get further information

View 2 Replies View Related

SQLdatasource Config Wizard Wont Allow Stored Proc As An Option?

Apr 17, 2007

Thanks for your time: 
Using the SQLdatasource wizard, selecting "Specify a custom statement or Stored Procedure", but the "Stored Procedure" radio button and drop box are NOT enabled (greyed out) and cant be selected.  Login has sa and no schema's are implemetned yet... Help?
Is there a setting I'm missing? (like how table needs a primary key set for wizard to allow auto-generate statements)
Otherwise, Is there a work-around I can use?

View 1 Replies View Related

Ho To Display SQLDataSource Tasks?

Jun 21, 2007

I have a problem with my Microsoft Visual Studio 2005, since I try to click and drag SQLDataSource to design page, it won't display  SQLDataSource tasks as usual so that I have a problem to configure SqlDataSource. Any help pls? Is there any way to solve this, since I'm not interesting to reinstall again.My specification computer : Pentium IV 2.00 GHz and Memory 512 MB.Best Regards,Aries  

View 4 Replies View Related

SqlDataSource Set To Stored Procedure, Tests OK In Wizard, Does Not Return Data When Executed

Apr 27, 2007

With a  Gridview Control, I set the SqlDataSource to be a stored procedure in a Sql Sever database. 
Using the wizzard to configure the datasource, the test returns lots of rows.  After completing the wizzard, the gridview control does not show the column names in the VS2005 designer.  For the gridview column headers the values are Databound Col0, Databound Col1, Databound Col2, ....)   This tells me I have a problem.
 I tried the same thing with a  simpler stored procedure. This test stored procedure does not call anything else, takes several input parameters, returns rows.  The column names show in the gridview control as expected.
 So I am trying to figure out why the first case of gridview with sqldatasource is not working and the second case works .  The stored procedure that is not working with my gridview calls multiple inner stored procedures and has #TEMP tables. My complex stored procedure ends with Select * from #Temp.
 Could the calling of other inner stored procedures and use of #temp tables contribute to the problem?  If yes then what is the strategy for using a gridview and loading it with the data that the complex stored procedure returns? 

View 8 Replies View Related

Display Return Value From Sqldatasource In Textbox

Feb 26, 2007

Hi,

View 1 Replies View Related

Display 1 Piece Of Data From A SQLDataSource

Jul 23, 2007

I have the following sqlDataSource. I wan't to display one piece of data, not a whole row, from it. I can find lots of information on putting it into a datagrid, but nothing on puttin one piece in a textbox. I cannot use a formview as we are embedding html in  response.write and it breaks in a formview. Thanks. 
 
<asp:SqlDataSource runat="server"
             ID="myEmpInfo"
SelectCommand="Select di.EmpInfo,di.eth,gc.t_level         From tblEmp di
        ,tblMisc gc
Where di.empnum = @empnumand di.empnum = gc.empnum" DataSourceMode="DataReader" ConnectionString="<%$ ConnectionStrings : myConnectionString %>">
 
<SelectParameters>
<asp:QueryStringParameter Name="empnum" QueryStringField="empnum"/>
</SelectParameters>
 
</asp:SqlDataSource>

View 1 Replies View Related

Slowly Changing Dimension Wizard Doesn't Display Destination Table Primary Key Column

Feb 22, 2006

I have added a Slowly Changing Dimension transformation to an SSIS package and have launched the Wizard to edit it.  After selecting the source (a SQL Server 2005 instance), if I select a very large table (9+ million rows), I'm encountering two strange behaviors:
1. The wizard hangs for several minutes before displaying the columns from that table.
2. The wizard does not display the primary key column.  This, of course, is the column I want to designate as the "business key", but can't because it's not displayed.
I know this is more like a fact table than a dimension, but this is not a data warehouse.  This is just a very large table, and I need to update a field in certain records based on the contents of a source text file.  Is there another transformation I should use to perform updates?

View 2 Replies View Related

Connection Strings

Nov 11, 2006

I am trying to develop a web site. I have a local ms sql database on my machine.
I am trying to connect to a ms Sql database on a goDaddy server from the application.
I am trying to understand the connection string and its total properties.
here is what I think should be in my web.config file

add name="Personal" connectionString="Server=whsql-v12.prod.mesa1.secureserver.net;
Database=DB_XX10;
User ID=myID;
Password=myypassword;
Trusted_Connection=False" providerName="System.Data.SqlClient"
 
/>
<remove name="LocalSqlServer"/>
can someone please tell me where I am going wrong, Thanks for your help.....

View 7 Replies View Related

Connection Strings

Nov 24, 2007

I developed an application and deployed it onto a hosted provider.  I use SQL 2005 Express for development SQL 2000 for production.  Both systems work.
I backed up my production database and wish to use it for my development testing.  I restored it as a SQL 2000 database on my development machine and changed my connection strings to point to it.  I added it as a new Data Connection in Database Explorer and can see all of the data through it, but I see that all the tables now have the owner name in parenthesis as part of the table name.
My application now fails trying to find any of the tables.  It works if I include the owner name as part of the SELECT statement.  So much for data separation.
I don't know where to start.  Is this an issue between SQL 2005 Express and SQL 2000, or is it an issue between SQL and ASP.NET, or is it a hosting provider issue, or what?????

View 6 Replies View Related

Connection Strings

Jan 24, 2008

Hey guys, don't know if this is in the right place but here goes.
I'd like some advice on optimizing the way I write my code. Here's the scenario. I have a select string for 3 different tables. One for the main gridview, and two others that are binded to dropdownlists.
So I created a Sqldatasource1,2,3 and had to create the connection strings for each one.
ex. SqlDataSource1.ConnectionString = "blah", SqlDataSource2.ConnectionString = "blah", SqlDataSource3.ConnectionString = "blah"the thing is, the connection string itself is the same. Is there a way to consolidate that? So that when I use a select/update/insert command for each sqldatasource i dont have to have another connection string? Also, having multiple connectionstrings, does that slow down the performance?

View 3 Replies View Related

Connection Strings

Mar 14, 2008

Hi,
Im struggling to work out the connection string to my ms sql database.
My website is being hosted with freezone.co.uk and I have a ms sql database called "aspnetdb". I usually log into the database with a username but no password. I don't no what other information is needed to create my connection string?
Thanks, Mark Lawton

View 2 Replies View Related

Connection Strings

Nov 6, 2006

I have created a SSIS package, and got it to perform as I want.

I am having a problem though with connecting to my data source (OLE DB Source) using SQL Server Authentication.

If I use Integrated security, I have no problems. If I use SQL Server Authentication, I get errors.

Here is the connection string that works:

Provider=SQLNCLI.1;Data Source=.SqlExpress;Integrated Security=SSPI;Initial Catalog=MyDataBase

Here is the connection string that fails:

Provider=SQLNCLI.1;Data Source=.SqlExpress;Persist Security Info=True;Password=**********;User ID=myUserid;Initial Catalog=MyDataBase

The strange thing is that when I use the Connection Manager dialog screen and click on "Test Connection", I get the response that the connection succeeded. It is only when I try to run the task that I get an error.

Here is the error I am getting:

[OLE DB Source [1]] Error: The AcquireConnection method call to the connection manager "MyDataBase" failed with error code 0xC0202009.

[DTS.Pipeline] Error: component "MyDataBase" (1) failed validation and returned error code 0xC020801C.

I have eliminated the obvious errors (incorrect Userid or password). Also, I am unable to use Integrated Security as this package needs to be distributed to various systems that may or may not be on our company's primary domain.

It seems I am missing something really basic here, but am not seeing it.

Any thoughts?

View 12 Replies View Related

Connection Strings

Dec 13, 2006

This is probably a very basic question and I apologise for asking. Can an app developed with VWD using SQLexpress be used with server2000? if so how do I modify the connection string.

View 2 Replies View Related

Display List Of Databases In App_Data Folder

May 16, 2007

Hi All,
The web site I'm working on will allow admin users to create a new database for each new client. I'm hoping to be able to keep all of the databases in the local App_Data folder, but I'm finding that I can't even find a way of generating a list of the databases in the App_Data folder.
The code I have is:Dim serverConn As New ServerConnection(".SQLEXPRESS")
serverConn.LoginSecure = True
serverConn.ConnectTimeout = 30
serverConn.Connect()
Dim sqlServer As Server = New Server(serverConn)

For Each db As Database In sqlServer.Databases
ListView1.Items.Add(db.Name)
NextThis does populate a list of databases, but not the ones in the App_Data folder - just those attached directly to the server.Any help on this will be greatly appreciated as it's starting to drive me nuts!Thanks,Paul

View 3 Replies View Related

Display Date Hierarchy Parameter List

Nov 20, 2007



I have a parameter consisting of a Year-Month hierarchy. The drop down parameter list appears as:

2007
1
2
3
4
5
6
7
8
9
10
11
12
2008
1

I have two questions:

Can I get the month names to appear instead of number?

When the parameter is selected the Parameters!DateShippedYearMonth.Label displays the month ONLY. How can I see the Year AND Month that was selected?


Thanks.

View 6 Replies View Related

How To Display List Of Tables &&amp; SP &&amp; Views In A Database?

Aug 16, 2007



Hi
In SQL Server 2000 & 2005

How to Display list of Tables & S.Ps & Views in a Database?

Please advise

Thanks

View 4 Replies View Related

Dynamic Connection Strings

Feb 5, 2007

Hi,
I am looking to allow a user to select which database they need to connect to, and then for them to be able to use that connection string until they choose a different database. I have a separate database specifically to hold the list of databases with the respective connection strings, and various forms that are currently looking at the web.config for the connection string. Unfortunately, I can't just put all the connection strings into the web.config as the number of databases available to the user will increase on a weekly basis which will be handled by a database administrator, so I want a user to select from a list of databases (for which they have permissions), and for that connection string to remain for that user. Potentially there will be 20 or more users each connected to a different database (all SQL Express).
If anyone can provide any help on this I will be truly thankful as I've hunted on the internet for hours and have been unable to find anything that has helped.
Thanks in advance.
Paul

View 4 Replies View Related

Dynamic Connection Strings

Feb 6, 2007

Dynamic connection strings
I have found lots of people asking for something similar to this but cannot find any solutions - can you help?
I am developing an application (ASP.Net2) in which users are associated with 'Clients' and every Client has their own SQL Server database.
Users are authenticated using standard ASP.Net Authentication via a separate database (common for all users). This includes a table linking them to a Client and each Client record includes the connection string to their database. Currently a default connection string is held in the web.config file.
My problem is that I don't know how to dynamically change the connection string after a user has logged on. I have a large number of databound controls, many of which are declared and some are coded in the VB.Net code behind. I know I can use code behind to change the connection string for a SQLDatatSource:
I thought I had it cracked with the following:
Public objClientConnection As New ConnectionStringSettings
Public Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)If Session("ClientDBConnectionString") <> "" ThenobjClientConnection.ConnectionString = Session("ClientDBConnectionString")objClientConnection.Name = "ClientDBConnection"objClientConnection.ProviderName = "System.Data.SqlClient"ElseobjClientConnection = ConfigurationManager.ConnectionStrings("WebTool1ConnectionString")End IfEnd Sub
The session variable Session("ClientDBConnectionString") holds the client specific connection string and is populated when the user logs on. If this is not populated then the connection string defaults to one collected from web.config. This should ensure there is always a design time connection string available.
The trouble is, when I try and declare the SQL data souce like this:
<asp:SqlDataSource ID="dsTest" runat="server" ConnectionString="<%# objClientConnection.ConnectionString %>" SelectCommand="usp_SEL_DocumentTypes" SelectCommandType="StoredProcedure" ></asp:SqlDataSource>
I get an error: The ConnectionString property has not been initialized.
I have been going around in circles on this for days and would really appreciate some help. Am I on the right lines? What needs to change to make it work? Is there a better way?
Many thanks,
Cliff

View 50 Replies View Related

Connection Strings In Web.config

May 31, 2007

What am I doing wrong?
This works:
SQLConn.ConnectionString = "Data Source=McD_DB;Initial Catalog=McDFeelGood;User ID=uuu;Password=ppp"
Now I want to put it in my web.config, but these don't work ("ConnectionString property has not been initialized"):
SQLConn.ConnectionString = ConfigurationSettings.AppSettings("McDFeelGoodConnectionString") (VS IDE says this method is obsolete)SQLConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("McDFeelGoodConnectionString")
<connectionStrings>    <add name="McDFeelGoodConnectionString" connectionString="Data Source=McD_DB;Initial Catalog=McDFeelGood;Persist Security Info=True;User ID=uuu;Password=ppp" providerName="System.Data.SqlClient" /></connectionStrings>

View 1 Replies View Related

TableAdapter And Connection Strings

Sep 19, 2007

Hello,
I'm trying to setup a typed dataset with a table adapter in .NET 2.0, and the problem I am having is that I cannot get the table adapter to use existing connection strings setup in the web.config file.  How can I get it to do so?  It doesn't see the connection strings, and so it wants me to create a new connection, which I don't want to do.

View 2 Replies View Related

SQL Server Connection Strings

Dec 18, 2003

I should start by saying that I'm new to SQL Server and ASP.NET. My question is about connection strings. With so many possibilities of these strings, how will I ever know what is best to use or try when one does not work. Is there a rule of thumb or an article or even a book that someone can recommend? Something that will demystify this part of working with the SQL Server and ASP.NET?

Thank you very much for any help on this.

View 1 Replies View Related

Database Connection Strings

Aug 2, 2004

My question is, are the user id and password optional when creating a database connection string? I've created an asp page without including them, but in my aspx page (which is basically supposed to do the exact same thing as the asp page), I'm receiving the following error:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Source Error:


Line 48: DisplayConnection = New SqlConnection("Server=infomart;Database=psg")
Line 49: DisplayCommand = New SqlCommand("SELECT RollOutID,RequestedDate,Background,Product,StagingPushDate,ProdPushDate FROM rolloutrequests ORDER BY RollOutID DESC", DisplayConnection)
Line 50: DisplayConnection.Open()
Line 51: DataGrid2.DataSource = DisplayCommand.ExecuteReader()
Line 52: DataGrid2.DataBind()


Source File: c:inetpubwwwroot
olloutrequests
olloutrequests.aspx.vb Line: 50

Stack Trace:

[SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
rolloutrequests.WebForm1.Page_Load(Object sender, EventArgs e) in c:inetpubwwwroot
olloutrequests
olloutrequests.aspx.vb:50
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Any help would be greatly appreciated! Thanks!

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved