Is There Any Way We Can Work With SQL Server 7.0 Database

Dec 28, 2007

Is there any way we can work with SQL Server 7.0 Database with ASP.net 2.0 ?

 

View 2 Replies


ADVERTISEMENT

Getting A SQL Express Database To Work On A SQL Server

Aug 10, 2006

Hi,
I'm getting ready to deploy an ASP.NET application to a server that does not support SQL Express, but does support MS Access and SQL Server. Is there any easy way to convert my SQL Express code to either Access or regular SQL Server code, without having to change very much code in my application. I really like the integration that SQL Express has with Visual Web Developer, and would like to be able to keep that sort of integration if at all possible.
Thanks,Drew

View 2 Replies View Related

Database Mail Does Not Work From Sql Server Agent Job After Upgrade To SP1

May 5, 2006

Upgraded SQL Server 2005 x64 to Service Pack 1 expressly for the purpose of enabling Database Mail from SQL Job, which was a known bug that was listed as fixed in this Service Pack. It still does not work; in fact after installing SP1 on an x86 SQL Server Standard, Database Mail does not work from there now either, although it did prior to the upgrade! I am using Integrated Security.

Error message received: The job succeeded.  The Job was invoked by User <name>.  The last step to run was step 1 (Select).  NOTE: Failed to notify 'Mike Schelstrate' via email.

Message in Error Log: [264] An attempt was made to send an email when no email session has been established.

Send test Email does work on both Servers.

Here is another Error message I found in the SQL Error Logs: [298] SQLServer Error: 2812, Could not find stored procedure 'msdb.dbo.xp_sqlagent_notify'. [SQLSTATE 42000] (DisableAgentXPs). Looks like this may be the root of the problem because it does not exist, I checked. How do I obtain this missing extended stored procedure?

View 9 Replies View Related

SQL Server 2008 :: How To Get Copy Of Database From Hosting To Work With Local PC

Jun 12, 2015

I lost my database on my pc as I format my hard drive. Now, how I can get a copy of my ms sql server database from my hosting to work with my local pc? I need to have a local copy so that I can develop my site without internet connection. For your information, I used Hostforlife.eu hosting service. I have searched and tried many methods to do it, but no luck yet. For example, I created a backup on Hostforlife.eu and restore backup file on my pc, but nothing happens. Then I created a new database, and re-created its structure same as the one on Hostforlife, then I used the import wizard to import data from them to my pc. Again, nothing happens.

View 5 Replies View Related

Will SQL Server 2005 Failover Clustering Still Work When The Database Level Is Set To 80?

Nov 2, 2006

We want to use sql 2005 failover clustering feature, so that upgrade sql 2000 is necessary. But some of the stored procedures built in 2000 are not working directly in 2005, set the compatibility level to 80 could make them work. In this case, can somebody here tell me if down grade the database level will affect failover clustering running properly? e.g. will data still be synchronized properly? Thanks in advance.

View 3 Replies View Related

How To Get A Microsoft SQL Server Compact 3.5 Database Multiuser Work On A Network Share

May 21, 2008

Hello All,

I need some advise/help how to deploy a small sql server compact 3.5 database on networkshare where about 8 people have access to it(install de client ) and can modify the database with aprox 3000 records.
I'm using visual basic 2008 and created a compact database and filled it with one table of an export of an access database done with data port console.
And created a new windows forms application and saved the project.
Publish is not the problem but how too set it up......
There is not much info to find on how to get a sql server 3.5 database running on a network share.
Who can help ???


Thanks


View 2 Replies View Related

SQL Server Express: Restore, Backup And Attach Do Not Work Anymore &&amp; Database Locations Fault

May 7, 2008

Hello there,

I've some really big problems with SQL Server 2005 Express. I Recently, I had 2 instances on my machine, one was a SQL Server 2000 Developer and the other a 2005 Express Version. The 2000 version was not necessary anymore, so I unstalled it, since then, the Express version keeps having probems.

Under the Server Properties -> Database settings -> Database Locations I've changed the path to D:sqldatamssql, but now, the programm always takes the "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData" to store and load the databases, no matter what I do.

And there are more problems see here:

Restoring does not work=======================
I wanted to restore a database called "fw40_admin" from a backup file (.bak), but that didn't work at all, it always says this as an error:

"System.Data.SqlClient.SqlError: The operating system returned the error '5(error not found)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'D:sqldatamssqlfw40_admin.mdf'. (Microsoft.SqlServer.Express.Smo)"

But as soon as I type in the installation path "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData" inside the "Restore As" under "Options", it works.

Why does the backup only work in "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData", BUT the database locations under the server properties is indicated with "D:sqldatamssql"????


Attaching does not work=======================
Attaching an existing database does not work either. Most databases (mdf) are located on the path D:sqldatamssql, but as soon as I press

Attach Databases -> Add

The dialog window appears with the "D:sqldatamssql" path, but it is unable to find any *.mdfs altough THERE ARE .mdfs in this directory. But Express can find databases in the selected installation: "C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLData".
Why can't Express see the directory on the D: partition???


What is wrong? Here? Can anybody help me?

View 5 Replies View Related

Update Database Won't Work

Oct 13, 2006

Hey Guys,

Could some help me out an tell me why this wont run.

I think I got an error at the bottom


USE InfoPathBudget
GO
UPDATE TOSS
SET ytdexpenses = SUM(monthlyExpenses)
SET ytdBudgeted = SUM(monthlyBudgeted)
SET ytdCapitalExpenses = SUM(monthlyCapitalExpenses)
SET ytdCapitalBudgeted = SUM(monthlyCapitalBudgeted)


I got this when I ran it
Server: Msg 157, Level 15, State 1, Line 2
An aggregate may not appear in the set list of an UPDATE statement.

View 1 Replies View Related

Database Connection Won't Work

Nov 11, 2007

I have read many tutorials and articles on how to connect with ADO.net and thought I had it right, but I don't so I'd appreciate any help and guidance you can give me.

This connection works:
Dim ConnString As SQLConnection
ConnString = ("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database1Names.mdf;Integrated Security=True;User Instance=True")

but this one does not work. Why doesn't it work?
Dim ConnString As SQLConnection
ConnString = ("Server=(local).SQLExpress; Database = Database1Names.mdf;Data Source = Trusted_Connection = True")
This code I copied from the tutorials I've read so I'm very confused why it won't work. the one that does work is nothing like this one!!
The first connection is the one I got from the property window of the dataset
I'm using XP Pro, VB.net express 2005 and SQL Express. I don't have any passwords on my laptop
As a beginner, what confuses me is that the tutorials I read say one thing, yet the code that works is completely different.
Any help will be greatly appreciated. Thanks
Regards,
Steve

View 3 Replies View Related

Help Configuring Database To Work As Intended

Dec 13, 2007

Hello everyone, I have created my web application in VS 2005  using asp.net 2.0  and the built in sql .mdf database creater that comes with visual studio.  After I developed my website, I then wanted to move it to one of our servers on the network, which I did without a problem. The website works fine but here is my challange. I need users to be able to connect to the database via login script and the script inserts computer data into the database.  So I figured I need to attach the Database to SQL Server 2005. When I try to do this it gives me this database is in use. So I stop the website in IIS, and it allows me to add the database into the SQL Server. Once I do this, and start the website again, the website no longer works and I get a bunch of database errors, that do not get fixed untill I re-copy the website to the server.
 Is there a way to just connect to a .mdf file on the network that is not attached to a sql server, through a connection string in a login script?  Maybe there is something else I need to do to the database before copying to the server?  Or should I re-programm the website with a newly created database in SQL Server, and use that as the datasource?

View 3 Replies View Related

Transfer Database From Home CPU To Work

Jul 24, 2000

Hello All,

I just got a new computer from work for Home use, and I need to figure out what would be the best way to transfer databases I create at home to work? I have a zip 250 disk, but what would be the best method?, What files need to be copied, what does it all entail?

Thanks for the help

Kevin

View 1 Replies View Related

Database Maintenance Plan. How Does It Work?

Dec 9, 2001

I am using Database Maintenance Plan to run backups. But I am quite short in disk space. So I declared to remove previous backups to release disk space. Still have problem when writing backup file onto the hard drive. I suspect that SQL first tries to complete backup and put in on the disk and only after that removes old file. Could not find any tips in BOL or elsewhere in what order this all goes - backup - then removal or removal - then backup. If anyone know I would be very happy for the rest of my life.
Thanks.

View 1 Replies View Related

Restore Won&#39;t Work (Database In Use Error)

Dec 3, 1999

I'm trying to use schedulled task to automate restore and i keep getting the error database in use, it is set to dbo only and single user, and it has me as the user that has the lock, i have tried to kill it but it won't go, i have even started and stopped the server. any ideas?

View 2 Replies View Related

Cannot Get A Simple Database Application To Work

Apr 24, 2008

Hi,

I tried to create a simple application based on the Sql Server CE samples and, as is typical when I play with databases, the program failed. In this case it failed to even load. The program has a form and a data source that I dropped onto the form. When I run the program the program breaks at this line:




Code Snippetthis._connection = new global::System.Data.SqlServerCe.SqlCeConnection();





The error is:

An unhandled exception of type 'System.DllNotFoundException' occurred in System.Data.SqlServerCe.dll
Additional information: Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

My first attempt at 'fixing' this was simply to copy the requisite DLLs to my bindebug folder. I found the DLLs here:
C:Program Files (x86)Microsoft SQL Server Compact Editionv3.5 and copied these - sqlcecompact35.dll, sqlceca35.dll, sqlceme35.dll, sqlceoledb35.dll, sqlceqp35.dll and sqlcese35.dll, sqlceer35EN.dll - to my bindebug folder.

Now instead of the first error, I get this error:

An unhandled exception of type 'System.BadImageFormatException' occurred in System.Data.SqlServerCe.dll
Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)


I am running Vista Business (x64) and using (the desktop version of) Sql Server Compact Edition 3.5 with Visual Studio 2008 Standard Edition. The test 'program' is written in C#. (Incidentally I can play with the database with no problems in Visual Studio 2008's server explorer. I can look at data, add data, etc.)

Can anyone please help?

Thanks.



View 3 Replies View Related

Database Mail Doesn't Work

Nov 21, 2007

I am having trouble getting database mail to work. I have tried many things, but can't make it work.

Initially, I setup IIS opn the same box as a virtual SMTP server. I set it up to relay to 127.0.0.1. In sql server, I setup database mail
to point to localhost, with no authentication. After the setup, when I test the email it works fine.


I created a job that will fail every time. I setup myself as the notify party on the job. When I run the job, it fails.
I get no email. The job log has the following error (notice failed to notify):

Message
The job failed. The Job was invoked by User xxxxAdministrator.
The last step to run was step 1 (test 1).
NOTE: Failed to notify 'Dan Jones' via email.

In the SQL Server log, I see:

[264] An attempt was made to send an email when no email session has been established


Also:

Message
[260] Unable to start mail session (reason: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException: Mail configuration information could not be read from the database. ---> System.Data.SqlClient.SqlException: profile name is not valid
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
a)

This is my preferred configuration, but I couldn;t make it work, so I tried another...


I tried to setup mail through my mail service provider. I entered the IP in sql server. When I test it, I get the following error:

Date 11/19/2007 8:16:06 AM
Log Database Mail (Database Mail Log)

Log ID 24
Process ID 3176
Last Modified 11/19/2007 8:16:06 AM
Last Modified By NT AUTHORITYSYSTEM

Message
1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: Could not retrieve item from the queue.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession)
HelpLink: NULL
Source: DatabaseMailEngine

StackTrace Information
===================
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)


On the same box, I used telnet to step through thge SMPT mail send process. It worked fine, indicating no firwewall, router or other issues.


I am of the opinion that Database mail is defective. This post is similar to another I have done, but no usefull responses have been made.
I am hoping that sonmeone will provide some useful information here

This is running on Windows 2003 Standard, and on SQL Server workgroup edition.
I have a second backup server similary configured that behaves exactly the same.



View 10 Replies View Related

Adventure Work Database Error

Jan 11, 2007

i followed all the instruction to add the database of the adventure works to the database server. but when i attach the database from the managment sql server this error comes

Couldnt find row in sysindexes for database ID 8, object ID1 ..........etc

and couldnt open new database 'adventureworks'. create database is aborted.

please i need a qucik help. cuz i tried the msdn and i failed.

thanks

View 1 Replies View Related

How To Find A Work In The Entire Database?

Mar 17, 2008



I have saved a word somewhere in somefield which i can't remember..

is there any way to search for the word in the entire datebase and show in which table and field it is stored?

View 3 Replies View Related

How To Install MSDE To Work With QuickStart Database

Mar 29, 2004

Hi

I have just tried to install MSDE and tried to make that work with Quickstart, however after several tries, I gave up, because everytime I installed MSDE it still does not want to work with Quickstart, can anyone please tell me how to do just that ?

I wonder some people in this forum complained about it as well. I wonder why it is so hard. And do I have to employ a DBA to do just that ^_^

I realized that MSDE that comes with VS.net 2002 CD was a lot easier to install and configure than the MSDE sp3

I am using Windows XP, VS.net 2003, ASP.net V1.1 and MSDE Sp3

Please help me all

Thank you

View 5 Replies View Related

Vwd + Sse Deploying Database File Doesnt Work

Jan 17, 2006

hi, i hope this is the correct forum?i have developed a small asp.net 2.0 web site with vwd using sqlExpress which appears to just bean data file and a log file in my app_data directory. there are two databases, the users one that is created by the login manager and my own that i created to store data. this all works fine on my laptop. i have an xp-pro machine setup with IIS and the frontpage web extentions, i have also installed the .net framework v2.0 on it and done all the windows updates. i have given app_data read/write access for the aspnet and network service users.i used the copy site feature of vwd to install on the xp box and although the site seems to workwhen it needs to bind a gridview to my sqldatasource it gives an error Cannot open user default database. login failed.Loginfailed for user 'rlxpaspnet'Any ideas? i have googled and tried all sorts, but to no avail, so i throw my self on your mercy!Cheers,russ

View 5 Replies View Related

Copying Website: Database Doesn't Work?

Mar 17, 2006

Since VWD Express doesn't support Publish Website, I used 'Copy Website' to deploy my local site to the hosting server. The static page works fine, but when it gets to accessing database, I kept getting the following error:
An attempt to attach an auto-named database for file I:DataWebdnh.sklingling_15726c71-b2bf-479f-bcc3-b7ae43318f3cwwwApp_DataPersonal.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Anyone has the same experience? How to resolve this?
Thanks,
 

View 2 Replies View Related

Installing Northwind Database By Instnwnd.sql Does Not Work?!

Dec 1, 2007

Hi all,

I downloaded the Northwind database install script (SQL2000SampleDb.msi) and ran instnwnd.sql in my SQL Server Management Studio Express. I got the following error messages:

Msg 5105, Level 16, State 2, Line 1

A file activation error occurred. The physical file name 'northwnd.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation.

Msg 1802, Level 16, State 1, Line 1

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64

The database 'Northwind' does not exist. Use sp_helpdb to show available databases.



Msg 15010, Level 16, State 1, Procedure sp_dboption, Line 64

The database 'Northwind' does not exist. Use sp_helpdb to show available databases.



Msg 911, Level 16, State 1, Line 1

Could not locate entry in sysdatabases for database 'Northwind'. No entry found with that name. Make sure that the name is entered correctly.

Msg 3726, Level 16, State 1, Line 2

Could not drop object 'dbo.Customers' because it is referenced by a FOREIGN KEY constraint.

Msg 3726, Level 16, State 1, Line 2

Could not drop object 'dbo.Employees' because it is referenced by a FOREIGN KEY constraint.

Msg 2714, Level 16, State 6, Line 1

There is already an object named 'Employees' in the database.

Msg 1913, Level 16, State 1, Line 1

The operation failed because an index or statistics with name 'LastName' already exists on table 'dbo.Employees'.

Msg 1913, Level 16, State 1, Line 1

The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Employees'.

Msg 2714, Level 16, State 6, Line 1

There is already an object named 'Customers' in the database.

Msg 1913, Level 16, State 1, Line 1

The operation failed because an index or statistics with name 'City' already exists on table 'dbo.Customers'.

Msg 1913, Level 16, State 1, Line 1

The operation failed because an index or statistics with name 'CompanyName' already exists on table 'dbo.Customers'.

Msg 1913, Level 16, State 1, Line 1

The operation failed because an index or statistics with name 'PostalCode' already exists on table 'dbo.Customers'.

Msg 1913, Level 16, State 1, Line 1

The operation failed because an index or statistics with name 'Region' already exists on table 'dbo.Customers'.

(1 row(s) affected)

............................................etc.

Please help and advise me how to get the Northwind database installed in my SQL Server Management Studio Express.

Thanks in advance,
Scott Chang

View 6 Replies View Related

How Do I Know Whether The Connection Is Open With The Sqlserver Database While Work In The Application?

Oct 22, 2007

How do i know whether the connection is open with the sqlserver database while work in the application?

View 2 Replies View Related

Ownership Chain Doesn't Work When Access Cross Database

Oct 25, 2007

i have enable cross database chain,but it return error message:



The server principal "S-1-9-3-1149532189-1170944071-2610337685-3868961652." is not able to access the database "db2" under the current security context.


I list the sql script as follows:






Code Block


use master;
go
create database db1;
create database db2;
go
use db2
go
create table table1
(
col int
)
go
use db1
go

create user u1 without login
go
create proc p1
as
insert into db2.dbo.table1 values(1)
go
grant execute on p1 to u1



execute as user='u1'
exec p1





thanks

View 9 Replies View Related

DB Engine :: Alter Database With Rollback Immediate Statement Doesn't Work

Nov 9, 2015

Primary platofrm: Sql12k, 7.0 Ultimate Pro OS

I'm launching the aforementioned statement from one MASTER session windows and I get this message, I am stuck, I though ROLLBACK INMEDIATE go throught any already session open.

Msg 5064, Level 16, State 1, Line 1
Changes to the state or options of database 'GFSYSTEM' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.

View 4 Replies View Related

SQL Server 2008 :: Linked Server Tests Fine But Query Does Not Work

Apr 16, 2015

Using a 32-Bit SQL Server 2008 Express on my LOCAL PC. I downloaded the Advantage 8.1 OLE DB Provider and created a linked server to a REMOTE Advantage 8.1 database server. There is no data dictionary on the Advantage server.

Here is my linked server:

EXEC master.dbo.sp_addlinkedserver @server = N'1xx.1xx.xx.1xx', @srvproduct=N'Advantage', @provider=N'Advantage OLE DB Provider', @datasrc=N'1xx.1xx.xx.1xxeccET', @provstr=N'servertype=ads_local_server;tabletype=ads_cdx;'--tabletype=’ADS_ADT’ (this test works too)
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'1xx.1xx.xx.1xx',@useself=N'False',@locallogin=Null,@rmtuser='adssys',@rmtpassword=Null

Testing the link succeeds with above. Using “ads_REMOTE_server” instead of “ads_local_server” and the test fails. Here is my problem, using the following queries will not work. Perhaps it’s a permissions issue? When I specify my local credentials for the remote server in the linked server it still does not work.

SELECT * FROM OPENQUERY([1xx.1xx.xx.1xx], 'SELECT * FROM ActType')

OLE DB provider "Advantage OLE DB Provider" for linked server "1xx.1xx.xx.1xx" returned message "Error 7200: AQE Error: State = HY000; NativeError = 5004; [Extended Systems][Advantage SQL][ASA] Error 5004: Either ACE could not find the specified file, or you do not have sufficient rights to access the file. Table name: ActType SELECT * FROM ActType".
Msg 7321, Level 16, State 2, Line 2

An error occurred while preparing the query "SELECT * FROM ActType" for execution against OLE DB provider "Advantage OLE DB Provider" for linked server "1xx.1xx.xx.1xx".

View 0 Replies View Related

DB Engine :: Trigger Jobs On Remote Server To Do Its Work On Original Server

May 10, 2015

I'm new to SQL. I have a scenario, Where customer want to move all the jobs from original SQL server to some remote SQL server and want to trigger jobs on remote server to do its work on original server.

View 4 Replies View Related

SQL Server 2005 Setup Of 2 Vista Machines, Can't Get Individual Network Login Accounts To Work On Each Others SQL Server

Apr 16, 2008


Hello all,

I have 2 networked PC's both running vista ultimate

1st is Laptop and is running its own SQL Server at laptoplaptopSQL
2nd is Desktop and is running its own SQL Server at desktopdesktopSQL

Now both machines have seperate windows login accounts.

When I go SQL Server management studio I go to browse and each machine can see the other machines SQL Server, but when I go to login I get SQL Login falied for users" The user is not associaed with a trusted SQL server connection".

So I then go to logins new login and try to add my other pc's user account.
The problem I see is that when I go to search and then location it only shows its own PC's location and not the location of my other networked pc? So if I am on Desktop and in my theory want to add laptopuser to the desktop SQL Server logins I get:

"create failed for login laptopuser

An exception occurred while executing Transact SQL statement laptopuser is not a valid windows NT name. give the complete name


Not sure on where to go from here.

Any help would be great

View 10 Replies View Related

Can SQL Server 2000 Publisher Work Normally With SQL Server 2005 Subscriber ?

Nov 8, 2005

or is there any resource about it?

View 3 Replies View Related

Upgraded To SQL Server 2005. Updates No Longer Work. Error Could Not Find Server 'DEVDB' In Sysservers. Execute Sp_addlinkedse

Feb 28, 2006

Hello!

We just upgraded to SQL Server 2005 from SQL Server 2000. The DB was backed up using Enterprise Manager and restored with SQL Server Management Studio Express CTP. Everything went as expected (no errors, warnings, or any other indicator of problems).

The DB resides in a DB Server (Server1) and the application we are running is a Client/Server system where the AppServer resides on Server2.

During the application's operation all read, create, and delete transactions work fine but no update works. When viewing details in Trace Log I see this message after attempting any update:

Could not find server 'Server1' in sysservers. Execute sp_addlinkedserver to add the server to sysservers. (7202)

Any help is greatly appreciated,

Lucio Gayosso

View 19 Replies View Related

Having Trouble Getting SP From Sql Server 2005 To Work In SQL Server 2000

Sep 18, 2006

I am getting an error saying incorrect syntax near fIt works in SQL Server 2005, but I cannot get it to work in SQL Server 2000  The error appears to be in the section that I marked in Bold. CREATE PROCEDURE [dbo].[pe_getReport]  -- Add the parameters for the stored procedure here    @BranchID INT,    @InvestorID INT,    @Status INT,    @QCAssigned INT,    @LoanOfficer nvarChar(40),    @FromCloseDate DateTime,    @ToCloseDate DateTime,    @OrderBy nvarChar(50)ASDECLARE         @l_Sql NVarChar(4000),        @l_OrderBy NVarChar(500),        @l_OrderCol NVarChar(150),        @l_CountSql NVarChar(4000),        @l_Where NVarChar(4000),        @l_SortDir nvarChar(4)BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements.   SET NOCOUNT ON;    SET @l_Where = N' Where 1=1'    IF (@BranchID IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.BranchID=' + CAST(@BranchID As NVarChar)    IF (@Status IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.Status=' + CAST(@Status As NVarChar)    IF (@InvestorID IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.InvestorID=' + CAST(@InvestorID As NVarChar)    IF (@QCAssigned IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.QCAssigned=' + CAST(@QCAssigned As NVarChar)    IF (@LoanOfficer IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.LoanOfficer LIKE ''' + @LoanOfficer + '%'''    IF (@FromCloseDate IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.ClosingDate>=''' + CAST(@FromCloseDate AS NVarChar) + ''''    IF (@ToCloseDate IS NOT NULL)       SET @l_Where = @l_Where + N' AND f.ClosingDate<=''' + CAST(@ToCloseDate AS NVarChar) + ''''    IF @OrderBy IS NULL      SET @OrderBy = 'DateEntered DESC'   SET @l_SortDir = SUBSTRING(@OrderBy, CHARINDEX(' ', @OrderBy) + 1, LEN(@OrderBy))   SET @l_OrderCol = SUBSTRING(@OrderBy, 1, NULLIF(CHARINDEX(' ', @OrderBy) - 1, -1))  IF @l_OrderCol = 'InvestorName'     SET @l_OrderBy = 'i.InvestorName ' + @l_SortDir  ELSE IF  @l_OrderCol = 'BName'     SET @l_OrderBy = 'b.BName ' + @l_SortDir  ELSE IF  @l_OrderCol = 'StatusDesc'     SET @l_OrderBy = 's.StatusDesc ' + @l_SortDir  ELSE IF  @l_OrderCol = 'QCAssigned'     SET @l_OrderBy = 'q.LoginName ' + @l_SortDir  ELSE SET @l_OrderBy = 'f.' + @l_OrderCol + ' ' + @l_SortDir  SET @l_CountSql = 'SELECT f.FundedID As FundedID FROM FundedInfo AS f LEFT OUTER JOIN                     Investors AS i ON f.InvestorID = i.InvestorID LEFT OUTER JOIN                     Branches AS b ON f.BranchID = b.BranchID LEFT OUTER JOIN                     Status AS s ON f.Status = s.StatusID LEFT OUTER JOIN                     QCLogins AS q f.QCAssigned = q.LoginID '                     + @l_Where + ' ORDER BY ' + @l_OrderBy    CREATE TABLE #RsltTable (ID int IDENTITY PRIMARY KEY, FundedID int)  INSERT INTO #RsltTable(FundedID)  EXECUTE (@l_CountSql)SELECT f.DateEntered As DateEntered, f.LastName As LastName, f.LoanNumber As LoanNumber,       f.LoanOfficer As LoanOfficer, f.ClosingDate As ClosingDate,       i.InvestorName As InvestorName, b.BName As BName, s.StatusDesc As StatusDesc,       q.LoginName As LoginNameFROM       FundedInfo AS f LEFT OUTER JOIN       Investors AS i ON f.InvestorID = i.InvestorID LEFT OUTER JOIN       Branches AS b ON f.BranchID = b.BranchID LEFT OUTER JOIN       Status AS s ON f.Status = s.StatusID LEFT OUTER JOIN       QCLogins As q ON f.QCAssigned = q.LoginID WHERE FundedID IN(SELECT FundedID FROM #rsltTable) ORDER BY       CASE @OrderBy WHEN 'DateEntered ASC' THEN f.DateEntered END ASC,       CASE @OrderBy WHEN 'DateEntered DESC' THEN f.DateEntered END DESC,       CASE @OrderBy WHEN 'LastName ASC' THEN f.LastName END ASC,       CASE @OrderBy WHEN 'LastName DESC' THEN f.LastName END DESC,       CASE @OrderBy WHEN 'LoanNumber ASC' THEN f.LoanNumber END ASC,       CASE @OrderBy WHEN 'LoanNumber DESC' THEN f.LoanNumber END DESC,       CASE @OrderBy WHEN 'LoanOfficer ASC' THEN f.LoanOfficer END ASC,       CASE @OrderBy WHEN 'LoanOfficer DESC' THEN f.LoanOfficer END DESC,       CASE @OrderBy WHEN 'ClosingDate ASC' THEN f.ClosingDate END ASC,       CASE @OrderBy WHEN 'ClosingDate DESC' THEN f.ClosingDate END DESC,       CASE @OrderBy WHEN 'InvestorName ASC' THEN i.InvestorName END ASC,       CASE @OrderBy WHEN 'InvestorName DESC' THEN i.InvestorName END DESC,       CASE @OrderBy WHEN 'BName ASC' THEN b.BName END ASC,       CASE @OrderBy WHEN 'BName DESC' THEN b.BName END DESC,       CASE @OrderBy WHEN 'StatusDesc ASC' THEN s.StatusDesc END ASC,       CASE @OrderBy WHEN 'StatusDesc DESC' THEN s.StatusDesc END DESC,       CASE @OrderBy WHEN 'LoginName ASC' THEN q.LoginName END ASC,       CASE @OrderBy WHEN 'LoginName DESC' THEN q.LoginName END DESCENDGO

View 2 Replies View Related

Can I Use SQL Server Management Studio Express To Work With SQL Server Everywhere?

Jun 14, 2006

Can I use SQL Server Management Studio Express to work with
this...SQL Server Everywhere?


I bought VS2005 Pro and installed everything, including the Developers edition
of SQL Server 2005.

I would love to play with this and try converting old Access desktop
applications.

Unfortunately I am unsure how to create and modify a new database for SQL Server Everywhere using SSMSE.


I have several tables that have a thousand records or so
used for Look-Up tables and really need a way to import those tables.

Working within VS2005 and manually creating tables just isnt
cutting the mustard here

What can I do?

View 10 Replies View Related

Work With SQL Server

May 27, 2007

Hello



In my application I check in which state is SQL Server - run/paused/stopped
I do it with object SQLServer from SQLDMO.dll.
After program compilation in BIN floder created file Interop.SQLDMO.dll
And in SQLServer folder (in which whole stuff of SQL Server is) there is
file SQLDMO.dll. My application indeed checks states of SERVER.



Now I need this application will work on another computer in which SQL Server
installed too. I place there EXEs and all DLLs compiled by my program into single folder (include SQLDMO.dll) but the desired checks do not work there.



What I need to do in order application can use SQLDMO.dll features on another computer too ?



Thank you

Yosef Fishov

View 4 Replies View Related

Can .net 1.1 Work With SQL SERVER 2005 ?

Jul 13, 2007

 What should I do if I want my asp.net 1.1 work with sql server 2005I get wrong message : SQL Server does not exist or access denied

View 5 Replies View Related







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