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


ADVERTISEMENT

SqlDataSource + Stored Proc

Mar 8, 2006

I am attempting to use a SqlDataSource to call a stored procudure from an ASP.Net page. There are a lot of parameters in the proc and each one has a matching form field. No matter what I do, I get no results when I use the aspx page to get my data from the proc. If I use datasource editor I can successfully query the proc and I can query it with enterprise manager too. I just can't call it with the aspx page. I don't what I'm doing wrong. Are there known problems with sqldatasource and procs? My web app connection string is using my admin name and password. Could it be a perms problem (no error messages are seen).  <asp:SqlDataSource ID="jobSrc" runat="server" ConnectionString="<%$ ConnectionStrings:PS11_1_NConnectionString %>" SelectCommand="rq_jp_jobstat" SelectCommandType="StoredProcedure">    <SelectParameters>            <asp:Parameter Name="tcDivno" Type="String" />        <asp:ControlParameter ControlID="startJobNoBx" Name="tcSjob" PropertyName="Text"            Type="String" />            <asp:ControlParameter ControlID="endJobNoBox" Name="tcFjob" PropertyName="Text" Type="String" />            <asp:ControlParameter ControlID="orderDateStartBx" Name="tcSordDate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="orderDateEndBx" Name="tcForddate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="dueDateStartBx" Name="tcSduedate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="dueDateEndBx" Name="tcFduedate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="proofDateStartBx" Name="tcSproofdue" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="proofDateEndBx" Name="tcFproofdue" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="closeDateStartBx" Name="tcSClosedate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="closeDateEndBx" Name="tcFClosedate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="cogsDateStartBx" Name="tcSCogsdate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="cogsDateEndBx" Name="tcFCogsdate" PropertyName="Text"                Type="String" />            <asp:ControlParameter ControlID="custNoDd" Name="tcScust" PropertyName="SelectedValue"                Type="String" />        <asp:Parameter Name="tcFcust" Type="String" />            <asp:ControlParameter ControlID="salesPersonDd" Name="tcSslpn" PropertyName="SelectedValue"                Type="String" />        <asp:Parameter Name="tcFslpn" Type="String" />            <asp:ControlParameter ControlID="openedByBx" Name="tcSjobper" PropertyName="SelectedValue"                Type="String" />        <asp:Parameter Name="tcFjobper" Type="String" />            <asp:ControlParameter ControlID="productBx" Name="tcSprod" PropertyName="Text" Type="String" />        <asp:Parameter Name="tcFprod" Type="String" />            <asp:ControlParameter ControlID="closedRd" Name="tnOpen" PropertyName="SelectedValue"                Type="Int32" />            <asp:ControlParameter ControlID="cogsRd" Name="tnCogs" PropertyName="SelectedValue"                Type="Int32" />            <asp:ControlParameter ControlID="canceledRd" Name="tnCancel" PropertyName="SelectedValue"                Type="Int32" />            <asp:ControlParameter ControlID="purgeRd" Name="tnPurge" PropertyName="SelectedValue"                Type="Int32" />            <asp:ControlParameter ControlID="shipRd" Name="tnShip" PropertyName="SelectedValue"                Type="Int32" />            <asp:ControlParameter ControlID="finalShipRd" Name="tnFinalshp" PropertyName="SelectedValue"                Type="Int32" />            <asp:ControlParameter ControlID="invoiceRd" Name="tnInvoice" PropertyName="SelectedValue"                Type="Int32" />        <asp:Parameter Name="tcVersion" Type="String" />        </SelectParameters>    </asp:SqlDataSource>And here are the parameters for the proc:DECLARE @RC intDECLARE @tcDivno char(2)DECLARE @tcSjob varchar(5)DECLARE @tcFjob varchar(5)DECLARE @tcSordDate char(8)DECLARE @tcForddate char(8)DECLARE @tcSduedate char(8)DECLARE @tcFduedate char(8)DECLARE @tcSproofdue char(8)DECLARE @tcFproofdue char(8)DECLARE @tcSClosedate char(8)DECLARE @tcFClosedate char(8)DECLARE @tcSCogsdate char(8)DECLARE @tcFCogsdate char(8)DECLARE @tcScust varchar(12)DECLARE @tcFcust varchar(12)DECLARE @tcSslpn varchar(3)DECLARE @tcFslpn varchar(3)DECLARE @tcSjobper varchar(15)DECLARE @tcFjobper varchar(15)DECLARE @tcSprod varchar(15)DECLARE @tcFprod varchar(15)DECLARE @tnOpen intDECLARE @tnCogs intDECLARE @tnCancel intDECLARE @tnPurge intDECLARE @tnShip intDECLARE @tnFinalshp intDECLARE @tnInvoice intDECLARE @tcVersion char(2)

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

SCOPE IDENTITY Using SqlDataSource WITHOUT Stored Proc

Oct 27, 2006

Ok, So I am trying to do 1 insert into a table and then insert more information into another table but I need to get the [TKTNUM] (the column with the idenity increment on it) value that was auto-generated when the insert was done. I have done a search and I am well aware that this are tons of posts on this subject already that is how I found out to use the SCOPE IDENTITY(). But nobody is using the insert syntax that I am using and since I am new, I don't understand any of it. I think they are using ADO.NET. I am extremely new to ASP.NET so take it easy on me ok guys... But can someone take a look at my code and tell me what the problem is. Again, I'm new so I am learning as I go so I might be missing something really stupid. Any help would be greatly appreciated. O yeah, I am running this code in a button click event NOT in a stored procedure (dont really know now to use those anyway).Here is my code:Protected Sub submitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs)Dim newTktNumIf Page.IsValid ThenDim it3Conn As SqlDataSource = New SqlDataSource()it3Conn.ConnectionString = ConfigurationManager.ConnectionStrings("ConnectionString1").ToStringit3Conn.InsertCommand = "INSERT INTO [IT_TICKET] ([REQUEST_DATE], [LOGGED_BY], [REQUESTED_BY], [TKTSTATUS],[NEEDED_DATE]) VALUES (@REQUEST_DATE, @LOGGED_BY, @REQUESTED_BY, @TKTSTATUS,@NEEDED_DATE); SELECT @newTktNum = SCOPE_IDENTITY()"it3Conn.InsertParameters.Add("REQUEST_DATE", DateTime.Now.ToString)it3Conn.InsertParameters.Add("LOGGED_BY", User.Identity.Name)it3Conn.InsertParameters.Add("REQUESTED_BY", User.Identity.Name)it3Conn.InsertParameters.Add("TKTSTATUS", "NEW")it3Conn.InsertParameters.Add("NEEDED_DATE", needByTB.Text.ToString)it3Conn.Insert()End IfMsgBox("Ticket Number: " & newTktNum & " has been created", MsgBoxStyle.OkOnly, "Ticket Created")End Sub 

View 2 Replies View Related

Using The SQL Server Config Option

Apr 11, 2008

I'm using a package configuration to set the value of a user variable which I then use inside my package to build out a certain expression. I got this to work with the XML file option, but I can't get it to work using the SQL Server option.

So this is what Im doing.

(1) I copy pasted the package that works with the XML config option.
(2) In the new package, I deleted the existing XLM config and created a new one, this time choosing the SQL Server option. After I finish, I see that the dbo.SSIS_Configurations table gets created in my database with the value of my variable in there.
(3) I run the package and I see that it works. I'm not sure at this point if it is working because it's reading the value from the config table or from the BIDs environment where I initialized the value.
(4) Anyway, I then go and update the value of my variable in dbo.SSIS_Configurations.
(5) When I run the package again, it doesn't see the new value. What am I doing wrong?

View 22 Replies View Related

Flat File Source Option Missing In The Sql Server Import &&amp; Export Wizard.

Jun 21, 2007

Hi All,

I want to import a txt file data to a sql server database table, to do this i used sql server import and export wizard. In this when we choose a Data Source, the option Flat file source is not coming up in the combo box in the wizard.



I am using sql server 2005, Management Studio to do this.



steps 1. right click on the database --> all tasks --> import data --> sql server import export wizard --> choose data source dialog box....



please help me.



thanks in advance.

View 1 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

Can You Trace Into A Stored Proc? Also Does RAISERROR Terminate The Stored Proc Execution.

Feb 13, 2008

I am working with a large application and am trying to track down a bug. I believe an error that occurs in the stored procedure isbubbling back up to the application and is causing the application not to run. Don't ask why, but we do not have some of the sourcecode that was used to build the application, so I am not able to trace into the code.
So basically I want to examine the stored procedure. If I run the stored procedure through Query Analyzer, I get the following error message:
Msg 2758, Level 16, State 1, Procedure GetPortalSettings, Line 74RAISERROR could not locate entry for error 60002 in sysmessages.
(1 row(s) affected)
(1 row(s) affected)
I don't know if the error message is sufficient enough to cause the application from not running? Does anyone know? If the RAISERROR occursmdiway through the stored procedure, does the stored procedure terminate execution?
Also, Is there a way to trace into a stored procedure through Query Analyzer?
-------------------------------------------As a side note, below is a small portion of my stored proc where the error is being raised:
SELECT  @PortalPermissionValue = isnull(max(PermissionValue),0)FROM Permission, PermissionType, #GroupsWHERE Permission.ResourceId = @PortalIdAND  Permission.PartyId = #Groups.PartyIdAND Permission.PermissionTypeId = PermissionType.PermissionTypeId
IF @PortalPermissionValue = 0BEGIN RAISERROR (60002, 16, 1) return -3END 
 

View 3 Replies View Related

How To Use ProviderName, User ID, Password, And Connection Saved In Web.config And SqlDataSource

Jun 1, 2008

Just downloaded and installed the VS 2008 Express and created/tested some websites.   I have done several aspx websites using VS 2005 during the last 2 years.  Still I don't quite understand the details of coding the database connection and DataBing.  For example, what does 'providerName',and Integrated Security really mean?Why in the Web.config file these are providerName="System.Data.SqlClient" and Integrated Security=True?  Why in Default.aspxthere are both ntegrated Security=True;and USER ID=WEB; Password=webwebweb1".  I know these may deal with the authentication mode of my SQL Serverdatabase.For the VS 2008 Express and SQL Server 2005 Express, I installed in my XP home PC, I used the file system websites,  If I upgrade to XP Pro and install IIS web server, and use SQL Server 2005, what might be different? Jeffrey Web.config <connectionStrings>        <add name="NorthwindConnectionString" connectionString="Data Source=D5MRY6G1SQLExpress;Initial Catalog=Northwind;Integrated Security=True"            providerName="System.Data.SqlClient" />    </connectionStrings>Default.aspx <asp:SqlDataSource ID="SqlDataSource1" runat="server"         ConnectionString="Data Source=D5MRY6G1SQLExpress;Initial Catalog=Northwind;Integrated Security=True; USER ID=WEB; Password=webwebweb1"         ProviderName="<%$ ConnectionStrings:NorthwindConnectionString.ProviderName %>"MasterDetail.aspx <asp:SqlDataSource ID="SqlDataSource2" runat="server"         ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"               

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

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

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 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

Stored Proc - Calling A Remote Stored Proc

Aug 24, 2006

I am having trouble executing a stored procedure on a remote server. On my
local server, I have a linked server setup as follows:
Server1.abcd.myserver.comSQLServer2005,1563

This works fine on my local server:

Select * From [Server1.abcd.myserver.comSQLServer2005,1563].DatabaseName.dbo.TableName

This does not work (Attempting to execute a remote stored proc named 'Data_Add':

Exec [Server1.abcd.myserver.comSQLServer2005,1563].DatabaseName.Data_Add 1,'Hello Moto'

When I attempt to run the above, I get the following error:
Could not locate entry in sysdatabases for database 'Server1.abcd.myserver.comSQLServer2005,1563'.
No entry found with that name. Make sure that the name is entered correctly.

Could anyone shed some light on what I need to do to get this to work?

Thanks - Amos.

View 3 Replies View Related

Stored Proc Question : Why If Exisits...Drop...Create Proc?

Jun 15, 2006

Hi All,Quick question, I have always heard it best practice to check for exist, ifso, drop, then create the proc. I just wanted to know why that's a bestpractice. I am trying to put that theory in place at my work, but they areasking for a good reason to do this before actually implementing. All Icould think of was that so when you're creating a proc you won't get anerror if the procedure already exists, but doesn't it also have to do withCompilation and perhaps Execution. Does anyone have a good argument fordoing stored procs this way? All feedback is appreciated.TIA,~CK

View 3 Replies View Related

ASP Cannot Run Stored Proc Until The Web User Has Run The Proc In Query Analyzer

Feb 23, 2007

I have an ASP that has been working fine for several months, but itsuddenly broke. I wonder if windows update has installed some securitypatch that is causing it.The problem is that I am calling a stored procedure via an ASP(classic, not .NET) , but nothing happens. The procedure doesn't work,and I don't get any error messages.I've tried dropping and re-creating the user and permissions, to noavail. If it was a permissions problem, there would be an errormessage. I trace the calls in Profiler, and it has no complaints. Thedatabase is getting the stored proc call.I finally got it to work again, but this is not a viable solution forour production environment:1. response.write the SQL call to the stored procedure from the ASPand copy the text to the clipboard.2. log in to QueryAnalyzer using the same user as used by the ASP.3. paste and run the SQL call to the stored proc in query analyzer.After I have done this, it not only works in Query Analyzer, but thenthe ASP works too. It continues to work, even after I reboot themachine. This is truly bizzare and has us stumped. My hunch is thatwindows update installed something that has created this issue, but Ihave not been able to track it down.

View 1 Replies View Related

Calling A Stored Proc From Within Another Stored Proc

Feb 20, 2003

I have seen this done by viewing code done by a SQL expert and would like to learn this myself. Does anyone have any examples that might help.

I guess I should state my question to the forum !

Is there a way to call a stored proc from within another stored proc?

Thanks In Advance.

Tony

View 1 Replies View Related

Stored Proc Calls Another Stored Proc

Jan 13, 2006

Hi all,

I have a stored procedure "uspX" that calls another stored procedure "uspY" and I need to retrieve the return value from uspY and use it within uspX. Does anyone know the syntax for this?

Thanks for your help!
Cat

View 5 Replies View Related

Calling Stored Proc B From Stored Proc A

Jan 20, 2004

Hi all

I have about 5 stored procedures that, among other things, execute exactly the same SELECT statement

Instead of copying the SELECT statement 5 times, I'd like each stored proc to call a single stored proc that executes the SELECT statement and returns the resultset to the calling stored proc

The SELECT statement in question retrieves a single row from a table containing 10 columns.

Is there a way for a stored proc to call another stored proc and gain access to the resultset of the called stored proc?

I know about stored proc return values and about output parameters, but I think I am looking for something different.

Thanks

View 14 Replies View Related

Calling T SQL Stored Proc From CLR Stored Proc

Aug 30, 2007

I would like to know if the following is possible/permissible:

myCLRstoredproc (or some C# stored proc)
{
//call some T SQL stored procedure spSQL and get the result set here to work with

INSERT INTO #tmpCLR EXECUTE spSQL
}

spSQL
(

INSERT INTO #tmpABC EXECUTE spSQL2
)


spSQL2
(
// some other t-sql stored proc
)


Can we do that? I know that doing this in SQL server would throw (nested EXECUTE not allowed). I dont want to go re-writing the spSQL in C# again, I just want to get whatever spSQL returns and then work with the result set to do row-level computations, thereby avoiding to use cursors in spSQL.

View 2 Replies View Related

Accessing Web.config From Stored Procedure

Feb 27, 2007

I want to access a key from appSettings  section of web.config. 
I have the number of days allowed for a user to activate his/her account  as a key in appSettings.
I have a maintenance procedure to delete all accounts that are not activated before that many days.
In this context, i have to access web.config from stored procedure.  The procedure will be scheduled as a JOB in sql server.
Thanks.
 

View 3 Replies View Related

Execute Stored Procedure Y Asynchronously From Stored Proc X Using SQL Server 2000

Oct 14, 2007

I am calling a stored procedure (say X) and from that stored procedure (i mean X) i want to call another stored procedure (say Y)asynchoronoulsy. Once stored procedure X is completed then i want to return execution to main program. In background, Stored procedure Y will contiue his work. Please let me know how to do that using SQL Server 2000 and ASP.NET 2.

View 3 Replies View Related

Step Into Stored Procedure - Not An Option

Nov 13, 2006

I cannot seem to get this to option to come up without having the full blown studio installed.

Is there something else that needs to be configured on the database before having this option enabled? I have enable clr (which is semi-unrelated to good ol' fashion stored procedure debugging) in the surface area configuration manager, but still no luck.

I am using SQL Server 2005 Standard Edition. I can get this feature working w/ no prob when I have the full blown Visual Studio Professional version installed, but not with just SQL Server - Futher insight would be helpful.

View 2 Replies View Related

How Can I Call One Or More Stored Procedures Into Perticular One Stored Proc ?

Apr 23, 2008

Hello friends......How are you ? I want to ask you all that how can I do the following ?
I want to now that how many ways are there to do this ?



How can I call one or more stored procedures into perticular one Stored Proc ? in MS SQL Server 2000/05.

View 1 Replies View Related

T-SQL (SS2K8) :: Stored Procedure With Parameter Option

Aug 29, 2014

I know ran across this some time ago when researching some other topic, but I would like to add an option to our stored procedures (which have multiple parameters) so a user could do something like:

EXEC dbo.usp_MyStoredProcedure - EXEC dbo.usp_MyStoredProcedure -?

The result would just list the parameters in the stored procedure and the options available for each parameter/what the parameter was use for.

Here is an example of one stored procedure in use:

CREATE PROCEDURE [dbo].[usp_MyStoredProcedure]
( @BCP INT = 0---- 0 [Default]: No BCP Import, 1: Insert TempBCP Data
, @Debug INT = 0---- 0 [Default]: Run process, 1: Create temp tables, run queries
, @StartDate smalldatetime = '1/1/1900' ---- Enter StartDate; [Default]: otherwise use Max of Invoice date
, @Date INT = 0 ---- 0 [Default]: Use std process (get last Saturday date from @StartDate), 1: Use @StartDate as is
)
WITH EXECUTE AS 'ADBAccount'
AS
BEGIN
....
END

View 2 Replies View Related

Stored Procedure Wizard

Feb 5, 2007

Hello Everyone and thanks for your help in advance.  I am new to SQL Server 2005 and am trying to understand the Stored Procedure Wizard.  In SQL 2000, it seems that the wizard does a lot more fo the actual generation of the sproc.  Also, I haven't figured out how to change the wizard to create an update, insert, or delete sproc.  I'm hoping that I'm simply not understanding how to effectively use it, but it really seems like the wizard has taken a step back.  Can someone give me some insight or articles on how to effectively use this?  Any help would be greatly appreciated.

View 3 Replies View Related

ASP.NET Wizard + Stored Procedure

Feb 21, 2007

HI,I have created a wizard control to collect user informations.First step : Personal informationsStep Two : Educational informationsAfter user completed and click finish button I want to add Personal informations to 'Personal' table in my sql server database.And also Educational information in to 'Educational' table.Using Stored Procedure  (here it is)CREATE PROCEDURE dbo.StoredProcedure1   @Fname varchar(10),  @Lname varchar(10),  @Email varchar(50),  @Tel varchar(20)AS  INSERT INTO Personal (Fname, Lname, Email, Tel)  VALUES (@Fname, @Lname, @Email, @Tel)  RETURN  So Now I want to add another stored procedure for Educational table.How do I do this.Should I modify this.But Educational info should goes to 'Educational' table not to 'Personal' How do I chieve this. Thanks 

View 1 Replies View Related

Stored Procedure Wizard

Nov 24, 2005

SQL 2000 had a Stored Procedure Wizard and I was wondering where it is in SQL 2005 or if it even exists any more. If it is gone was an alternative created?

View 6 Replies View Related

Stored Procedure Wizard

Feb 7, 2007

Hello Everyone and thanks for your help in advance. I am new to SQL Server 2005 and am trying to understand the Stored Procedure Wizard. In SQL 2000, it seems that the wizard does a lot more of the actual generation of the sproc. Also, I haven't figured out how to change the wizard to create an update, insert, or delete sproc. I'm hoping that I'm simply not understanding how to effectively use it, but it really seems like the wizard has taken a step back. Can someone give me some insight or articles on how to effectively use this? Any help would be greatly appreciated.

View 3 Replies View Related

In SqlServer Management Studio Express, Server Type Option Is Greyed Out, Also Publication Option Missing

Apr 27, 2008

Hi everyone In my SqlServer Management Studio Express, on start up it shows the server type option, but greyed.So that value is fixed to database engine. ( I'm trying to work on an SqlServer Compact Edition database through the SSMStudiothat's why I'm trying to get this to change.)Besides, after I connect i go to the Object Explorer, expand the server node, and go to Replication.When i expand replication, i get the "Local Subscription" option, but nothng for Publication.( I want to work on Merge Replication, that's why I desparately need Publication to work)Am i missing something here? I did not install SqlServer separately, I only have what comes bundled with the Visual Studio  2005 Setup.

View 2 Replies View Related

Stored Procedure Wizard Missing

Nov 10, 2006

anyone know where the stored procedure wizard went in sql 2005?
 in 2000 it was so easy to check the type of SP you wanted and then it automatically wrote all the fields and value tsql for that - literally took 1 minute to create an insert update delete stored proc on any table.
i don't see that in sql 2005
let me know, if you know.
thanks - Jeff

View 1 Replies View Related

Copying Stored Procs With The DTS Wizard

Oct 3, 2001

Hi All,

I have been abloe to copy tables from one db to another, but am getting a "Failed to copy objects" error when trying to import stored procs. can anyone please tell me what I'm doing wrong?

TIA,
Bruce

View 3 Replies View Related







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