I need to use a variable in a sql query used in a stored proc as follows:
Declare @Src varchar 100
Select * from @Src
View Complete Post
Is it possible to call 1 Stored procedure from another withing a sql query
select ID1,ID2,ID3,ID4 from table1 ;
select name from table2 where ID = ID1;
I want to get corresponding names of ID1,ID2 and ID3,ID4 in sp1 as a query result.Is it somehow possible to call sp2 from sp1???thanks in advance.
I'm using Enterprise Library Logging feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data is not logged in the Formatted Mesage column which is of data Type nText .
I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.
Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.
Thanks In Advance.
I wanted to know how to prevent more than one user from
uploading the report at a time .I am new to .net ,plss help with the
code that would be great.Details are below:
This is a Windos based
app written in c# . When User A clicks Upload option on one server
from the menu to upload the files and at the same time when User B
clicks Upload option on different server , User B should be alerted a
message saying "User A's uploading is in progress,pls wait" . How to
achieve this, plsss help with the code.. I am thinking this logic should be kept in a stored proc, How do I write that proc? plss help
Thanks in advance!
I have an InfoPath web enabled form that gets published to a SharePoint site. I need to add a list box to the form that gets populated with data returned from an existing call to a SQL Stored Proc.
As the form works now, the user types in a patient id #, then clicks a button that calls the Stored Proc and returns any patients that match the given patient ID. This part works.
My task is to add a list box so that if more than one patient is returned , display the list box with all of these patients populated in it.
I am hoping to do this within the confines of the existing code. The existing code looks like this:
private bool LoadPatientInformationFromDB(string patientId, string patientFirstName,
string patientLastName, string patientMiddleInitial, string birthDate, string gender,
string admitDate, string location)
bool completed = false;
//Load from DB
SqlConnection conn = new SqlConnection(GetOrderSetDBConnectionString());
//Create Form Builder
formBuilder = new FormBuilder();
SqlDataAdapter adpt = null;
if (!String.IsNullOrEmpty(patientId) || !String.IsNullOrEmpty(patientFirstName) ||
!String.IsNullOrEmpty(patientLastName) || !String.IsNullOrEmpty(patientMiddleInitial)