|
I wonder why everyone runs away from XML...
Let me know if you find a more elegant way.
Maybe you have also time to run some performance tests
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
I don't object to xml - just the removal/simplification of any script.
I ran across an article using XML to pass recordsets into a function - what an excellent use of a technology. So for mae at least it is whatever does the job.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Nope - the idea I had didn't work, the only other way I could get at this was to use a function which is even uglier!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
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.
santosh
|
|
|
|
|
look into the oncellformat event. There are a number of articles here about formatting cells in a gridview.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
HI Frens,
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)
Is there any suggestable scenario?
Have a Nice Day Dudes
|
|
|
|
|
Fairly obvious that there is an error in your code, and as I'm telepathic I can tell you that you have not inserted the error records into your return table.
Think about the question you are asking, how the bloody hell is anyone going to be able to help with the information you have supplied!.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi My Friends
When We Backup a Database We just Backup From Tables
How Do I Move Stored Procedures And Views When Backup database With Sqlserver?
|
|
|
|
|
Hi,
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.
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
thanks for your help
is there any way to do this with out wizard ?
i want to do this in my program that write with c# and sqlserver
|
|
|
|
|
i need to layout a giant database
however, i dont have visio. are there any free and easy flow chart programs?
it is just database layout and nothing more complicated...but paint really is not helping me much with this.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
Moved on Monday, July 21, 2008 10:26 PM
|
|
|
|
|
What kind of database is it?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
relational. huge bastard.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
I meant, MSSQL, Oracle, MySQL, which one?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
you know i thought you meant that...but i was trying to get the smell out of the kitchen from letting my cooking attrocities hang too long.
MSSQL
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
|
nice. thanks
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
Pen and Paper are your friend.
Back in Uni I have had pen and paper assignments that were larger and more complicated than real-life assignments.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Hello,
I need to create a view to a database on a remote server, and I found linked servers in SQL. I mostly got it to work, except for one subtle requirement.
The database name on the remote server can change, and I don't want to hard code it in my views (also for testing purposes).
When I call sp_addlinkedserver[^] I can specify a default database name as the last parameter.
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.
Any ideas?
Thanks!
|
|
|
|
|
Just a guess. Maybe catalog (or default database) has actual meaning only on OLEDB-queries?
I'm not able to test this at this time, but if you can try what happens if you modify your query to use OPENQUERY-call:
SELECT * FROM OPENQUERY(SERVER2, 'SELECT * FROM dbo.Shipments')
Any difference?
Mika
|
|
|
|
|
Mika Wendelius wrote: Maybe catalog (or default database) has actual meaning only on OLEDB-queries?
After I saw your post, I tried this:
EXEC sp_addlinkedserver @server ='TRW', @srvproduct = '', @provider = 'SQLOLEDB',
@datasrc = '127.0.0.1', @location = NULL, @provstr = '', @catalog = 'trw_data' and it didn't work either.
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 .
Thanks, you got me into the right track.
|
|
|
|
|
Good question!
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.
Glad that it helped
Mika
|
|
|
|
|
I was thinking about building a query string, and passing that to OPENQUERY . But it can't be done. You can't even concatenate anything in the OPENQUERY call itself.
I'll have to see how big my remote table is. I would rather not modify the remote database, but if that is the only way, I'll talk to my customer.
Thanks for your help!
|
|
|
|
|
You're welcome
A little trick that came into my mind which could be useful to you.
BEGIN
DECLARE @remoteQuery varchar(8000);
SET @remoteQuery = 'SELECT * FROM OPENQUERY(SERVER2, ''SELECT * FROM dbo.Shipments'')'
PRINT @remoteQuery
EXEC (@remoteQuery)
END
Mika
|
|
|
|
|
hi everyone,
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
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|