AttachDbName Relative Directory

Jan 23, 2007

I have host my ASP.NET application on gate.com, and there I have access to a SQL Server 2005 instance, and I am trying to make relative paths in my web.config work, (|Data Directory|), but I don't know how to change the default value of |Data Directory|, and it isn't the root of my application, I'm pretty sure. My setup is like so, and the file was created using SQL express 2005, I am not sure if that is my problem, because gate uses the full version.

/<root>/App_Data/Leads.mdf

here is the stack trace:


[SqlException (0x80131904): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735091
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
   System.Web.Profile.SqlProfileProvider.GetPropertyValuesFromDatabase(String userName, SettingsPropertyValueCollection svc) +766
   System.Web.Profile.SqlProfileProvider.GetPropertyValues(SettingsContext sc, SettingsPropertyCollection properties) +428
   System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider) +410
   System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName) +117
   System.Configuration.SettingsBase.get_Item(String propertyName) +89
   System.Web.Profile.ProfileBase.GetInternal(String propertyName) +36
   System.Web.Profile.ProfileBase.get_Item(String propertyName) +68
   System.Web.Profile.ProfileBase.GetPropertyValue(String propertyName) +4
   ProfileCommon.get_Cart() in c:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files
oot27a74ff4376615bdApp_Code.ceobor1b.4.cs:102
   Default2.UpdateTotal() in \shared.hosting.local
fscust98045754089webOrder.aspx.cs:45
   Default2.Page_Load(Object sender, EventArgs e) in \shared.hosting.local
fscust98045754089webOrder.aspx.cs:37
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


 

View 2 Replies


ADVERTISEMENT

Using Provider For Microsoft Directory Services For Querying Active Directory

Apr 6, 2007

Has anyone used this successfully from an OLEDB source component, or even from the Execute SQL Task? I've seen some examples of using a script component, but nothing that uses it through a connection manager.

View 6 Replies View Related

Relative Path

Apr 16, 2008

I have my SqlDataSource with my connection string:<add name="ConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:UsersLaurensDesktopstockmanASP****.accdb" providerName="System.Data.OleDb"/> but I wanted to make a relative path from it because when I put it online i get an error. Thanks in advance  

View 6 Replies View Related

Relative Paths

Mar 30, 2006

We have a growing issue where we have a relative dtsconfig file (which stores the absolute base path of the ETL packages). This way we can keep the ETL projects failry portable - only having to modify one value in the dtsconfig file. The master package that defines the dtsconfig location (which is config/Default.dtsconfig) usually interpretates this location to be relative the project. The problem is that every now and again when you open this package in .NETStudio, the path is interpreted differently and causes: config/Default.dtsconfig  to state invalid path. But when we delete the variable (which defines the dtsconfig path), save/close and open/recreate it works again. This may or may not be supported MS method, but I was curious to know why this gets messed up. Is there somehwere in the .NET framework that defines what "/" is relatively under?

For example: Our absolute config path is "D:Program FilesMicrosoft SQL Server90DTSPackagesETLProjectETLBaseconfigDefault.dtsconfig" but using: "config/Default.dtsconfig" for xml file value works. However, sometimes we will get an error stating that this file cannot be found, and when we just try to delete (without saving and closing) and immediatelly try to put "config/Default.dtsconfig" again and hit next, we get an error and the path is now:

'D:Program FilesMicrosoft SQL Server90DTSPackagesDEVDataExchangeETLBaseconfigconfigDefault.dtsconfig'.

Ideas?

View 6 Replies View Related

Relative Dates For The Next Month-help

Apr 18, 2008

need help
i have table employee and the employee insert into table the holidays
the date start >>>> to date end
now i need to create a view only for next moth , in this view i need to see only the relative dates for the next month


"tb_all_holiday before"
date_start date_end
----------------------------------------------------------
15/03/2008 00:00:00 17/09/2008 00:00:00

20/04/2008 00:00:00 12/05/2008 00:00:00



i must to covert it like this

to this - see relative dates for the next month

"VIEW_all_holiday after -next month only "
date_start date_end
----------------------------------------------------------
01/05/2008 00:00:00 31/05/2008 00:00:00

01/05/2008 00:00:00 12/05/2008 00:00:00

TNX for help

View 2 Replies View Related

XML Source Xsd Relative Path

Apr 24, 2007

Hi all,

Is it possible in the XML Source to specify a relative path for the xsd file? If not, do you have any idea why?

Best regards,
pc

View 5 Replies View Related

Drill Through --relative Path

Sep 21, 2007

I'm trying to use the drill-through feature to link to a report in different solution, on the same server, but in a different project. Local help files say: "The list of report names includes all reports in the current report server project. If the drillthrough report is on the report server but is not in the project, type the name of the report. The report name can contain a relative or absolute path to the report."


The report will be passing a parameter to the target report through drill-through. The target report is located on different solution and project but on a same server (report manager). Any help will be be appreciated.


Can someone give an example of a relative path? Nothing I've tried has worked, and I've posted this on sqlteam to no avail.



Thanks,

Lalon

View 1 Replies View Related

Insert Relative Columns

Jul 26, 2006

So I want to insert 40 values into a table, starting at a particular column. Like this:

INSERT INTO MyTable (1) VALUES (...my forty values...)

Pretending that 0 (zero) indexes the first column, and 1 indexes the second column, the purpose is to skip the (first) column that contained an identity value (since normally you can't insert into an identity column anyway).

The only way I currently know how to solve this problem, is to use highly verbose syntax, like this:

INSERT INTO MyTable (...my forty column names...) VALUES (...my forty values...)

But yuck, who wants to explicitly mention all forty column names, ONLY BECAUSE I'm trying to avoid inserting a value into the first column which contains the identity?

View 1 Replies View Related

Query Field Relative To Max Date

Nov 10, 2005

How do I query to ONLY pull the location for the most recent date?

Date Location
1/2/97 ABC
3/4/02 DEF
2/8/89 GHI
4/30/05 JKL
2/28/03 MNO

View 1 Replies View Related

Relative Time In A Data Warehouse

Feb 28, 2008

At my office, we've been slowly working on putting together a data warehouse.

We're a financial services company and one of the services that we offer is debt collection. As far as reports go, our clients are interested in knowing how much money we collect over time. In particular, they want to know how many payments we've gotten 5, 10, and 15 months (and so on) after we receive a case. (Obviously, the 5-month payments are also included in the 10 and 15-month calculations).

When I wrote this report using our transactional database, I was completely new to SQL and the ever-resourceful Patron Saint took pity on me, so you can see a good description of the details at http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78510

Now that I'm no longer a total newbie at SQL, and having been through a relatively extensive seminar on data warehousing, I've been entrusted with researching certain aspects of data warehouse development (rest easy, though, folks - the real DWH work is not being done by the very inexperienced me, but by an actual professional :) ).

My question:

how would you model this kind of "relative time" in a data warehouse? How would you display the 5-month, 10-month, and 15-month payments in a DWH? I can't really imagine that the kinds of joins necessary to do this in a transactional database would be desirable in a data warehouse.

We have the following:

1.) FACT_Payment: A fact table showing each each payment to the most detailed granularity. One attribute of this table is the payment date. Another attribute is a foreign key to the case dimension described below.

2.) DIM_Case: A dimension table showing information on each case, including the case start date. DIM_Case

3.) DIM_Date: A date dimension table.

(For added clarification: The FACT_Payment payment date has to be 5, 10, 15 months etc... after the DIM_Case start date.)

Any ideas, comments, experience with something like this?

Thank you.

View 7 Replies View Related

Relative Path For Child Packages

Apr 20, 2007

hello again!, this time I'm trying to run a Master Package from the SQL Server Agent but I can't set relative paths to the connections for all the child packages that the master package contains.
It only finishes execution when I set absolute paths for all connections in the connection manager within the SSIS Project.

Is there any property in the SQL Server Agent or mayby a workaround to solve this?

View 7 Replies View Related

Relative Beginner With View Issues

Oct 30, 2007



I'm trying to create a view from a query using a temp table and I'm running into some strange issues. When I try to enter the query into the view it gives me the following error, but then the query runs and returns the expected data:


"Unable to parse query text."

In an attempt to get around this (I assumed that temp tables just weren't supported with in a view) I put my query into a Stored Procedure and attempted to call the SP from the view. This gave me the same results as before (an error and then a result set) but the error was the following:


"The EXECUTE SQL construct or statement is not supported."


The query seems to run properly in both forms, it just gives an error on the first run and won't allow me to save the view because of the syntax error. The stored procedure runs just fine and returns the right data, so I'm pretty sure that my query is good. I just don't know how to make it execute into a view without getting these errors.

Any help would be greatly appreciated.

Thanks!

Phil

View 13 Replies View Related

Create Assembly With Relative Path

Jan 11, 2008

I am new to the wonders of CLR and, as can be expected, have hit a snag. We have multiple environments to run this off of (dev, test, production, etc.) and need to be able to use the same scripts to install them. Here is our basic setup:



Batch script runs a master SQL file using sqlcmd utility
Master SQL file runs secondary SQL files, including the one with the CLR definitions
Secondary SQL file with CLR calls the CREATE ASSEMBSLYI want to be able to call

CREATE ASSEMBLY assemblyName FROM 'myAssembly.dll'

or

CREATE ASSEMBLY assemblyName FROM '..myAssembly.dll'

or something to the effect. However, when I try this, it says I cannot do it or it cannot find the file, even though the file is located in the same folder.

Any ideas?

View 3 Replies View Related

SQL Server 2008 :: CPU Usage Relative To Each Database

Feb 26, 2015

I am looking for the script to find the CPU usage for each database like this

Test1DB76.00%
Test2DB12.00%
Test3DB1.21%
Test4DB20.08%

View 4 Replies View Related

Calculate Relative Totals With Absolute Values

Feb 28, 2015

Have a bit of an SQL challenge in that I need to create a well performing view in SQL2008R2 which calculates hours remaining at any given point in time. This is not a simple sum but has some absolute values included.

---------------------------------------------------------------------------------------------------
-- Basic simplified structure of maintenance and usage tables
---------------------------------------------------------------------------------------------------
CREATE TABLE #Maintenance (Id int NOT NULL
IDENTITY(1, 1)
CONSTRAINT PK_Maintenance PRIMARY KEY,
MaintenanceDate smalldatetime NOT NULL, -- When maintenance hours are reset
HoursAvailable numeric(5, 1) NULL -- Available hours until next maintenance
)

[Code] ....

---------------------------------------------------------------------------------------------------
-- Required output view so that at any given point in time I can determine hours remaining
---------------------------------------------------------------------------------------------------
-- AtDate HoursAvailable
-- '01-Jan-2015 15:00' NULL -- before first maintenance hence unknown
-- '10-Jan-2015 10:00' 10.1 -- maintenance hours reset
-- '11-Jan-2015 07:30' 8.9 -- subtract 1.2
-- '11-Jan-2015 11:10' 2.9 -- subtract 6.0
-- '15-Jan-2015 00:00' -0.1 -- subtract 3.0
-- '01-Feb-2015 00:00' 12.2 -- maintenance hours reset
-- '02-Feb-2015 13:00' 10.0 -- subtract 2.2

View 4 Replies View Related

Returning Up To Previous Sunday Relative To Today

Apr 18, 2008

I'm quite a newbie with MDX.

I have a report that uses MDX to return Figures by day. The user selects the Month/Year eg.[Nov F2007] that he wants to see the figures for.

Here is the catch:

The user wants the figures to cut off to the previous Sunday. So if its Thursday, the result set will still only return results to Sunday.

What I'm thinking is something like this:

STRTOMEMBER('[Nov F2007]').FirstChild : STRTOMEMBER('[Nov F2007]').[LastSunday].

I'm not sure if I'm on the right track, but its a mute point if I can't get the previous sunday as a normal day member (ie. 4 November 2007)



Thanks,
Jason

View 3 Replies View Related

Relative ConnectionString For SQL Server 2005 Express

Apr 20, 2006

I am creating a application in Visual C++ 2005 that has database
connections in it. I have gone through the process of setting up the
data source and it will work great on my computer. However, the second
I move either the project or the created executable to another computer
the application keeps crashing. I know that it is crashing due to the
database connection string. The string is setup to work only on my
computer, I am wondering how do I make, or edit, the string to work on
any computer? Thanks for the help.

View 1 Replies View Related

Memory Usage Relative To Size Of Database

Nov 29, 2007

Does anyone know if there is a rough guide in terms of how much memory SQL server will normally use relative to the size of the actual databases that it is hosting?



For example, I'm working on a server that hosts only about 250-300 MB worth of data (including all of the full text indexes, etc.) but the sqlservr.exe process is using 1.25 GB of ram. Also Page Reads/sec is around 1200 -- despite there being over 5 GB of RAM available and not being used (the PF is about 3.25 GB, total memory in the machine is 8GB). Below that w3wp.exe uses only 290 MB and lsass.exe uses only about 225 MB. The machine is a web/database server that is hosting ASP.NET 2, ASP.NET & Classic ASP pages (and the associated databases). For the amount of hardware, the server seems to be responding to requests on the slow side. While some of this is probably due to the legacy code-base, there seems to be a noticeable difference in speed after SQL Server is restarted.



Thanks,



Jeremy

View 1 Replies View Related

How To Use Relative Path For Links In Reports While Using URL Access?

Apr 23, 2007

Dear Sirs,



We use NLB + ISA , Win2003/SP1 + Reporting Services 2005



We use host name URL to access Reporting Serives reports, like http://www.hostname.com/Reportserver?rc%3aParameters=false&amp;%2MyReports%2f....



When reports have grouping , the drill down images(+/-) and links failed to be displayed. We checked the HTML source code and found, instead of the reative path, the image/link URLs are using FULL path and using IP address, like http://10.102.40.55/Reportserver/.....



Because the company policy do not allow use IP to access reports , those drill down images and links failed to be displayed.



How can I configure Reporting Service to use host name or relative path for the drill down images and links.



PS:

We have changed the <UrlRoot> in rsreportserver.config and <ReportServerUrl> in rsWebApplication.config to use host name, but no worked.





Best regards,



Roger (roger_lo@gss.com.tw)











View 1 Replies View Related

Parent? Child? Distant Relative? Casual Aquaintance?

May 20, 2004

Hi all, I have a question that relates to a relationship in my stock performance database. It is a conceptual one, but is the only aspect of my database design that I am "losing sleep over" *LOL* (as if that could happen with me... ;) )

Anyway, Here are my tables/Keys, as setup

1) CurrentList - Primary Key is PortfolioID, StockID, BuyDate, Selldate.
- essentially, this table defines stock portfolios. A PortfolioID has one-to-many StockIDs (stocks in the portfolio), and each PortfolioID/StockID pair can further be grouped by BuyDate and Selldate (because a single stock may come in and out of a single portfolio over time).

2) StockProperty - Primary Key is StockID, CreateDate. This table is built on a daily basis from rows in the Currentlist. It represents the affected stocks currently in ANY portfolio. For example, the IBM stock may exist in more than one PORTFOLIO (PortfolioID) but there will still only be ONE row for IBM on a particular date (CreateDate) in the StockProperty table (since the stock is the same stock, regardless of how many portfolios it is in).

I am trying to figure out which is the parent table, and which the child...or if there IS an "enforceable" relationship at all!?!? None of the non-key data is the same in either table, so the only columns with a relationship is StockID, and StockProperty.Createdate - which must be between CurrentList.BuyDate and CurrentList.SellDate.

I guess that's my quandry (or one of myriad quandries in my life ;) ) - I can't really think of how to enforce (via foreign keys, etc) the relationship in the date range...AND...how to explain the relationship between the two tables (I lean toward CurrentList being Parent to StockProperty, but can't come to grips with what the probably obvious "standard" relationship description would be.

Any (preintable) thoughts?
Thanks!

View 2 Replies View Related

Query Of Set Time Range Relative To Current Date

Dec 26, 2013

I come in to work 6.30am, and need to audit what happened from 5pm when I left to 6.30am this morning. I have used code to search 13.5 hours back from any given time:

SELECT * FROM TRANSACTION_HISTORY
WHERE TRANSACTION_HISTORY.ACTIVITY_DATE_TIME > (SELECT DATEADD(hour,-13.5,(SELECT MAX (TRANSACTION_HISTORY.ACTIVITY_DATE_TIME) FROM TRANSACTION_HISTORY)))

Problem is if I run query later, I lose time from the start, eg. If I run query at 7am, I only get results from 5.30pm onwards. Rather than change criteria every day, I wanted to able to search from 6.30am of the current day, back to 5.30pm of the previous day.

View 3 Replies View Related

[HELP!] How Do You Make The Database Path Relative In The Connection String?

Oct 10, 2006

Hi everyone,

I am working on a Hospital Information System project with a team of 6.Each one of us builds or modifies a part of the system and shares the project over a common repository. The problem here is that we use the absolute path of the database in our connection string. Although the directory structure of our project is the same for each member, since the main project folder itself is stored in different locations on each person's computer (for example, one may have it stored in c:My Documents and the other in d: My Documents), we are forced to modify the connection string manually each time someone else from the team updates the repository with the database. How do we make the path of the database relative so that we don't have to modify the connection string manually each time after receiving an update from the repository?

Your help is greatly appreciated.

View 1 Replies View Related

Import Column Transform And Relative/absolute Path

Apr 26, 2007

Hi,

I have a table with a BLOB column, and I need to populate this table including the BLOB column (image type in the database).



What I have done is:

1. use a flat file transform to read a .csv file which specifies the names of the files that store the binary contents for the BLOB column for each row.

2. use an Import Column Transform to read the binary files.

3. use an OLE DB Dest transform to dump the data into my destination table.



I got the error saying:

Error: 0xC02090BB at XXXX, Import Column [1]: Opening the file ".diagram1.bin" for reading failed. The file was not found.



I guess this is because my file "diagram1.bin" is not in the current path? (The current path can be found by "System.IO.Directory.GetCurrentDirectory() call, in my case it is "c:program filesmicrosoft visual studio 0common7IDE".)



My question is: how to determine the directory path information of the package I am running?



Thanks!

Wenbiao

View 3 Replies View Related

Package Configuration File Issue - Relative Path Not Recognized In VS2005

Feb 7, 2008

I have been reading through different posts about how to manage SSIS configuration files across multiple environments. I have seen a few that mention a solution that turns out not to really work (or maybe I€™m doing something wrong); which is what I hope to find out here.

Solutions I am working with:
1: Put the XML Configuration file in the same directory as the SSIS package and only specify the config file name when setting it up in the package. I do not specify a path to the XML Configuration file, just the config file name.

ISSUE: This works when I first create the package and test it without closing down visual studio. Even after deploying the SSIS package and the config file and moving it between environments it works as long as the working directory of the DTExec command is the same directory as the SSIS package and configuration files. The problem comes in after I have closed Visual Studio and opened it again and loaded up the SSIS package. It then gives a bunch of errors stating that it can€™t locate the configuration files€¦. If I could fix this issue, then this would be a solution that I could live with. (I would much rather use a relative path to a different directory but I€™ll live with what I can get). Can anyone solve the issue of Visual Studio 2005 not recognizing the location of the configuration files when only the configuration file name, and not the path is specified?

-- The other odd thing is that I have been able to get this to work consistently with some of my packages but not others. I'm not sure what I did to get those packages to recognize the location of the xml config file.

Thank you in advance for any input and help.

View 27 Replies View Related

Report Viewer Jump To Issues With Relative Intra-report URLs

Dec 26, 2007

Hello,

Very strange phenomenon with the "Jump to report:" Hyerlink Actions when I deployed my reports to the production servers:

The Actions no longer funcioned properly when attempting to go to one report to another. Sometimes, the same report would come up and sometimes a different report. It appeared that whatever mechanism Report Server uses to construct the proper URL when using "Jump to report:" is unreliable(or the URL is not being honored by the web-server).

All this is happening under the Report Viewer control. I have had to do a painful fix of manually constructing the entire absolute URL and including the reportviewer control in the url.

Any way to get back relative Jump to report: URL's?

Thanks JS

View 1 Replies View Related

Report Builder: Date Filter, Relative Date

Dec 14, 2006

I have a date filter, and I default it to first day this month and last day this month under relative date, when I run it it givis me error:

The Value expression for the report parameter €˜FromDate€™ contains an error: [BC30456] 'Date' is not a member of 'Integer'. (rsCompilerErrorInExpression)

Can anyone fix this problem?

But it works for Today or (n)months ago.

Thanks.

View 6 Replies View Related

For Each Directory

Jun 5, 2007

How can I modify the for each loop to go through all the folders under parent folder?



ParentFolder

SubFolder1

SubFolder2

SubFolder3





View 7 Replies View Related

APP_DATA Directory

Jun 23, 2006

If I already have SQL2005 installed, can I create SQL express databases for distribution in my app, or do I need to install SQLExpress to run side-by-side?
I actually had SQLExpress originally but upsized it to the full version.  Now I want to be able to create portable DBs with my application.
And if this is possible, how do I go about creating the DB?
Thanks!
 
 

View 3 Replies View Related

How Can I Get AD(active Directory) Value In T-SQL?

Nov 6, 2001

Hi all,
Now I want get AD value(e.g file path),how can I get this value from AD?

Thanks

View 1 Replies View Related

Active Directory

Nov 24, 2004

Hie,
Someone can tell me haw can i do in order to migrate my server sql to active directory.
What is the step

View 1 Replies View Related

Scan Directory

Nov 1, 2007

Hey guys,

I have a procedure that runs everyday which takes the IIS log file from the previous day and imports it and calcs values. I would like to change this from taking the previous day to scanning all the file names in the folder and comparing them to a database to see if they have already been scanned before. I already have a table called DatesScanned which lists the filename and scandate.

IE:

D:Logsfile1.log
D:Logsfile2.log
D:Logsfile3.log
D:Logsfile4.log

The 4 file names will be scanned and compared to DatesScanned to see which has been imported already.

Can anyone point me to a resource or information on how I would get the directory listing of a folder so I could compare it to the DatesScanned table.

Thanks a bunch!

Jeff

View 5 Replies View Related

Virtual Directory

Feb 5, 2008

Hi Guys,
Windows XP, IIS 5.1

I have written an installer that creates an MS SQL Database, creates the
necessary data tables and then imports the data into the data tables. All
this works fine.
I now need to copy the web pages to a directory on the users machine and
then make the chosen directory a virtual directory so the user can call the
pages in the usual way (http://localhost/mytestsite/index.html)

Would anyone know how to create a virtual directory using dos command line parameters. I have seen something using "IIsVdir.vbs" but I do not have this script file.

Any help would be really appreciated.

Best Regards,

Steve.

Steve

View 1 Replies View Related

Reading A Directory

Feb 28, 2007

I do a lot of file processing and I usually run a little script I copyand paste to read directory information to see if a new file it thereand then process the file if it is. So, I decided to wise up and makea stored procedure to automate a lot of that.The pivotal step in this is that i run a command that looks like:CREATE TABLE #DIR (FileName varchar(100))DECLARE @Cmd varchar(1050)SET@Cmd = 'DIR "' + @Path + CASE WHEN RIGHT(@Path, 1) = '' THEN ''ELSE '' END + @WildCard + '"'INSERT INTO #DIREXEC master..xp_CmdShell @CmdWhen I run the stored procedure I get back the files and folders inthere that match the wildcard and all is good!!!!....Until I try to put that information into a table while calling thatstored procedure:CREATE TABLE #Files (Path varchar(100),FileName varchar(100),PathAndFileName varchar(150),FileDateTime SmallDateTime,FileLength int,FileType Varchar(10))INSERT INTO #FilesEXEC sp_GetFileNames @Path = '\isoft2ftpLegacyBilling', @Wildcard= '*.txt'When I run this I get:Server: Msg 8164, Level 16, State 1, Procedure sp_GetFileNames, Line53An INSERT EXEC statement cannot be nested.Because I use an INSERT EXEC to with the results from the @Cmd.Anybody have any ideas how I can get that information into a table?I did try to just copy the data to c: empdir.txt and then bulkimport it in. But when it runs the @Cmd to create the file it comesback with a NULL value and my stored procedure returns two sets ofvalues... which I can't do.So, I would appreciate anybody who can help.Thanks!-utah

View 4 Replies View Related







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