SQL Server :: Get List Of Files From Directory Using Stored Procedure?
Jul 23, 2010
i have a folder where some txt files are located.
i want to get list of those txt files using query in SQL Procedure.
I tried some Query it is not returning Txt files in List. It just Listing Folders.
how can i achieve this.
View 3 Replies
Similar Messages:
Oct 1, 2010
I'm looking to pass a list into a stored procedure, stored as List<myClass>. I've passed a table in before but I'm not sure how to pass a list.
View 1 Replies
May 17, 2010
I have seen some examples on other sites , but since im not familiar enough with DirectoryInfo and Files from the System.IO namespace, i dont know how to change it to fit my needs. So i found a very simple example that works, but i have some questions.
Here is the code i found:
[Code]....
This works great and lists the files in my root directory.
#1 - What i need to know is how to accomplish the same thing but in a format i can control, this code simply displays the files at the top of my page and pushes everything down. So does anyone know of a good and simple tutorial written in C#?
#2 - I also need to be able to setup the code so that certain files within the directories are not displayed, as in the code behind files and other files to be determined by the business.
View 2 Replies
Jan 28, 2011
I could probably figure this out if I tried to, but I have been working so long on code, I'm a little fried
I have a stored procedure, and I want to execute another stored procedure during a time period of lets say 1/1/2011 to 12/31/2011
How Would I accomplish this?
View 4 Replies
Mar 14, 2010
i want data to drop down list using stored procedure .
However im not able to do that.
View 3 Replies
Oct 1, 2010
I have created stored procedure and student database and also asp.net application for asp.net page but it could not found stored procedure what is the mistake actually I don't no
View 7 Replies
Nov 23, 2010
how can I create stored procedure and write my select statement in it, I know how to create dataset then put type stored procedure and assign it to the sp ... what I want is writing my sp... how can I make it ?
check the following code, this is what I want to write put I don't know where or how !
CREATE STORED PROCEDURE SP_CATEGORY
@CATEGORY VARCHAR(30)
AS
BEGIN
SELECT LATIN_NAME, ENGLISH_NAME, ARABIC_NAME, CATEGORY
FROM FLORA, CATEGORY_LIST
WHERE FLORA.CATEGORY=CATEGORY_LIST.CATEGORY_NAME AND CATEGORY_LIST.CATEGORY_NAME IN (SELECT * FROM SPLITLIST(@CATEGORY, ','))
END
where can I write this code ?!
View 5 Replies
Sep 1, 2010
I am trying to create the following stored procedure in sql server Lat and Lng are the parameters being passed from c# code behind .But I am not able to create this stored procedureit indicates with error saying undefined column name Lat,Lng
CREATE FUNCTION spherical_distance(@a float, @b float, @c float)
RETURNS float
AS
BEGIN
RETURN ( 6371 * ACOS( COS( (@a/@b) ) * COS( (Lat/@b) ) * COS( ( Lng/@b ) - (@c/@b) ) + SIN( @a/@b ) * SIN( Lat/@b ) ) )
END
sqlda.SelectCommand.CommandText = "select *, spherical_distance( Lat, 57.2958, Lng) as distance
from business
[code]...
View 1 Replies
Jul 10, 2010
have made a file as "SQLQuery2.sql"
and a stored procedure named p1one
using sql server managmt stdio express 2005
how to call these query and the stored procedure and store the result in dataset to bind to gridview
View 2 Replies
Aug 10, 2010
I have a name/value pair in a List<T> and needing to find the best way to pass these to a stored procedure.
Id Name
1 abc
2 bbc
3 cnn
What is the best way to accomplish this?
View 3 Replies
Jan 20, 2010
I have a form that I need to add a new multiple selection criteria. I added a List Box and I populate it on Load. After user selected his choices I need to pass the values to SQL Select stored procedure. I use C# and SQL. I am not sure how to pass the values and write SQL statment that would select records with the selected values. I also have RAD Teleric list box but again the values need to be passed to sql.
View 2 Replies
Apr 2, 2010
This is surareddy. i nead some small clarification in the "Stored Procedure"
how to convert the oracle Stored Procedure to sqlserver2005/2008 Stored Procedure.
right now i am enhancing the project that project already developed the oracle Stored Procedure. now our company is using sqlserver 2005/2008.
how to convert the Oracle Stored Procedure to sqlserver 2005 Stored Procedure
View 4 Replies
Dec 9, 2010
Initially, I have tried to use stored procedure. But I changed my mind and preferred to call sql query in codebase with command text. However, it stills tries to find initially-called stored procedure (which is neither called or exists).I think that it is related caching. But I tried it with different browsers it did not work.What might be the reason?
View 4 Replies
Aug 3, 2010
I have heard that saving connection strings and stored procedure names in web.config file of our application is not safe. It is a good practice to store the connection string in a config file rather than as a hard coded string in our code and if we need to change it,then it makes our job easier. how to protect our code in web.config?
View 4 Replies
May 14, 2010
I am going to add a computed column to a stored procedure that will combine the last and first names of all of the customers in my db. This will be used to populate a drop down list that will allow the user to select a customer so a new record can be entered for that customer.
I was planning on creating this computed column on the procedure that returns all of the customers and all of there information. My db is small so this shouldn't be a big deal, as far as overhead. This doesn't seem like the best approach if the app was using a much larger db. It would unnecessarily return a lot of extra data and make it slower.
I'm curios when a procedure that's dedicated to returning just the customer's first name, last name, and ID should be used, instead of one that returns everything. There are a number of variables that could make this hard to determine, such as number of rows and columns. I wanted to try to get an idea of a cut off point or rule of thumb on this, if possible.
View 2 Replies
Apr 29, 2010
My dropdown list is populated by a group of names inalphabetical order.
However, I would like "Please Select Name" to be the first item in dropdown list.
View 5 Replies
Jan 8, 2010
i need to list client machine Drivers
-> Directories
> Files
using Treeview Control is it possible how to done this
View 1 Replies
Mar 14, 2013
I have a web in ASP.NET+VB code and there is a folder named POLICY and there are pdf files in it. i want to display the list of files in a aspx file with hyperlink so that the files listed can be opened...
View 1 Replies
Jan 18, 2010
Does anybody if it is possible that a stored procedure returns rows which is the result of the execution of another sp? Something like..
[Code]....
View 11 Replies
May 13, 2010
i want to return output parameter from 1 storeprocedure. into another stored procedure.
View 7 Replies
Dec 23, 2010
I'm trying to display a list of Excel files that are stored in multiple folders in adatagrid but the .GetFiles part of the routine in my loop only gets the very last excel file rather than all that meet the criteria. Below is the code I've been working on for several days. This is the first time I have tried to use a "For next loop," and I am having much trouble with this. Using the same loop code posted I was able to verify that the loop was working by appending some text into a temporary label.
[Code]....
View 6 Replies
Nov 27, 2010
Server Error in '/staff' Application. Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. 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: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. Source Error:
[Code]....
Stack Trace:
[Code]....
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
View 31 Replies
Oct 29, 2010
I am trying to create a stored procedure that filters data from sql server by date but i get this error:
Conversion failed when converting datetime from character string.
my stored procedure is like:
[Code]....
the parameters are passed to the stored procedures as dateTime variables from c# code...
View 10 Replies
Feb 27, 2011
The following stored procedure updates the value in LeaveTransaction table.
[code].,...
My Question here:
I have written the above trigger,which would update the value for the corresponding records in another table ie) LeaveCumulative table. The trigger is not updating the value in the designated rows in the leavecumulative table. Whereas when I excute the same update command separately in the Query Editor window the trigger is working fine.
View 1 Replies
Aug 9, 2010
Here is my stored proc
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
Create PROCEDURE [dbo].[sp_GetNextSeq] (
@p_NextSeqNo int = NULL OUTPUT
)
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
BEGIN TRANSACTION
Generate Next Sequence Number
[code]...
View 7 Replies