hii..i have sqldatabase from which the data is being displayed in gridview fields and i am performing edit delete operations using the link buttons.and finally i want to dispaly the record of a single row in color format but i am unable to do so.and gridview fields are boun ddata fields.plz help me out.
Am using a user defined function which returns a Table.Meanwhile in the function am checking the condition with 2 if loops and inserting the error in to another tables table1 and table2, but after satisfying these 2 conditions, i will get final output table3,
as of now am getting only table1 irresepective of conditions status(Pass/Fail)
If you are using Management Studio for SQL 2005 then you can navigate to the Database->Programming
-> Storage Procedures, and in the object explorer details page, select all the procedures right click and select "Script Stored Procedure As" -> Create To -> New Query Window (or File if you'd like). This will back up your stored procedures.
The thing is, what's is it for? The way to connect to another server is using the four part notation ([server].[database].[owner].[table]) such as SERVER2.ShippingDB.dbo.Shipments. But if I specify a default database when creating the linked server, I suppose I should be able to obviate the database name, like this:
SELECT * FROM SERVER2..dbo.Shipments
I've tried it and I get this error messege:
Msg 7313, Level 16, State 1, Line 1<br />
An invalid schema or catalog was specified for the provider "SQLNCLI"for linked server "SERVER2".
I've searched all around the net and I only found a post in MSDN forums asking the same thing, but no answer.
OPENQUERY seems to work fine. One question though: Performance-wise, is it a good choice if the remote table pontentially will have a lot of records? I suppose that if add a filter in the inner query, it would be faster. But what if that filter were dynamic? The only thing I can think of is to build the query with string concatenation before passing it to OPENQUERY.
Dynamic SQL seems to be the only option and since you cannot use variables inside OPENQUERY, all the conditions must use literals for values. This however isn't so big problem any more in SQL Server 2005 than it was in earlier versions since the database is now much more intelligent in reusing SQL statements.
Also one caveat is that max size of the query string is 8K. Because of that and performance reasons, maybe you could create a view or views at remote site and try to use as many static filters in the view as possible.
I've a table in which the primary key needs to be a six digit number and must start from 1, so for that I made it an identity key (100001,1) but the problem is that I can't figure out how to restrict this to not exceed 199999
I'm using Sql Express 2005 as the Database. As far as I've seen while googling it out. There's no obvious way to do that. Can anyone comment on that plz?
Thanks in advance
Success is a ladder which you can't climb with your hands in your pockets.
Last Visit: 31-Dec-99 18:00 Last Update: 24-Sep-23 23:27