|
|
Russell Nash wrote: If I leave the data in a dataset:
Will the data persist after the connection is closed?
Yes, if you use disconnected datasets.
Russell Nash wrote: Can I connect that dataset to either a new data adapter, or change the connection string of the data adapter?
I am pretty sure it can be done.
Russell Nash wrote: Is it efficient to copy the data into a different dataset?
By using DataSet.Copy()?
Russell Nash wrote: How do I save the data from the XMLReader to a file?
To dump contents of Dataset to an XML file use DataSet.WriteXml().
Russell Nash wrote: Is this efficient?
I guess.
Russell Nash wrote: Is there another option I'm missing, that would be more efficient?
One option would be the plain old fashion way of doing stuff like that. Generate INSERT statements and using Bulk Insert. Very fast and easy.
Russell Nash wrote: I could make this go, but as the datasets are going to be quite large, I want to make sure I'm doing it in the best way.
For larger data, I find BULK insert to be the most efficient way.
Farhan Noor Qureshi
if (this == this) thow this;
|
|
|
|
|
i need a query to display unique customers on each of thier last purchase date alone segregating other dates in the same columns for the same customer
thanx in advance
sathy
|
|
|
|
|
If you want help on building a query then you need to tell us what the tables are, what columns are available, what the primary key(s) are on each table and their foreign key counterparts on other tables.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
the table contains customerId(foreign key), dateOfPurchase, totalValue, shopId(primary key) these are the four columns to be dealth
i want to display unique customerId, dateOfPurchase(in specific the last purchase date of a customer), totalValue for the given shopId
select distinct customerId, max(dateOfPurchase)as date, totalValue from business_orders where shopId = '9F5DF' group by customerId
this query works when totalValue is not added in the query
sathy
|
|
|
|
|
imsathy wrote: this query works when totalValue is not added in the query
That is correct, it must be in the GROUP BY clause or part of an aggregate. If you want the totalValue from the corresponding date you need to create a subquery.
SELECT customerId, [date], totalValue
FROM business_orders AS bo
INNER JOIN (
SELECT customerId, max(dateOfPurchase) AS [date]
FROM business_orders
WHERE shopId = '9F5DF'
GROUP BY customerId) AS ld ON
bo.customerId = ld.customerID AND
bo.[dateOfPurchase] = ld.[date]
I also removed the DISTINCT keyword as the GROUP BY effectively does that already and so it was redundant.
CAVEAT: If you have two or more orders on the same dateOfPurchace then you will get duplicates for an individual customer. There is nothing you can do about that as there is not enough date to determine which was really the last purchase.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
thanx a lot Colin
sathy
|
|
|
|
|
I'm trying to integrate Reporting Services with an existing ASP.NET 2.0 web application. The goal is to click a button to call a report, but instead of just calling an existing report, to pass the dataset and create dinamically the report. If that's possible, users can create their own reports, by selecting the fields that will appear in the report.
Is that possible? Where can I find a way to achieve that?
Regards,
Diego F.
|
|
|
|
|
I have a datagrid in which there are 2 columns
--First one is a template column which is having a textbox in its itemtemplate.
--secound one is a bound column and is picking up some unique values from database
Now on the page load i am providing the datagrid its datasource and binding it then. after i bind the data, the text boxes will have some values which is the first column and the secound column will be having some unique value now what i want is when i click on a button(not in the grid anywhere on the page) i want to update all those records for which the value in the text box(in the datagrid) has been changed and i want to update all the changes in the database in one trip back to the server.
Help Me!!!
|
|
|
|
|
You are very ambiguous in describing your "problem" but this is a simple matter of getting your hands on decent ASP.NET book that covers databinding in Webforms.
|
|
|
|
|
Hi,
Im using Win2000 SP4 with SQL Server 2000 SP4
Basically i need some help with the following.
I have 2 Tables: Called Member and MemberTable
In Member table a column in there stores Names (Called Names) of the members and also in MemberTable there is another column called Names (Called Names) Which stores Names also of members.
I want to erase all rows in MemberTable that do not match those in Member (Case insensitive).
Can anyone provide a code? I tryied doing this myself and erased all at the end
Good thing i had a backup!
Please help.
Chris
|
|
|
|
|
If I'm understanding you correctly...
DELETE FROM [MemberTable]
WHERE [Called Names] NOT IN (SELECT [Called Names] FROM [Called Member])
HTH
|
|
|
|
|
Fellow Professionals,
Is there anyway to get the NT users associated with the server in SQL Server 2000? I know xp_enumgroups gets a list of NT Groups but I can not find a stored procedure that returns that information. Does SQL 2005 have it? My other alternative is to write a .NET object and obtain this information from the local network.
Well can anyone help me? Please let me know.
Best Regards,
Bob Zagars
|
|
|
|
|
Bob Zagars wrote: Is there anyway to get the NT users associated with the server in SQL Server 2000?
SELECT name
FROM master..syslogins
WHERE IsNTUser = 1
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
That gives me registered users what about user not yet regisered. Stored procedure:
xp_enumgroups
Provides a list of local Microsoft® Windows NT® groups or a list of global groups defined in a specified Windows NT domain.
Syntax
xp_enumgroups ['domain_name']
They do not have to be registered on the database just within a Windows NT domain.
Best Regards,
Bob Zagars
|
|
|
|
|
Bob Zagars wrote: They do not have to be registered on the database just within a Windows NT domain.
If they haven’t been registered in SQL Server then SQL server won’t know about them. You will need to interrogate the Domain it self, if it’s an Active Directory Domain (I think it’s called tree now) here is a vb script that lists all disabled users, a minor mod and it could dump out all users.
List All the Disabled User Accounts in Active Directory[^]
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
S. Douglas,
Thanks I will check it out and let you know if it works.
Bob Zagars
|
|
|
|
|
No problem...
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
how can i insert aur select data to sql Server through public IP, is there any configuration for this...? i have my own physical server do there any different setting for this. or any different connection string . i m very much fed up for this can any one help me out.
|
|
|
|
|
install the client on the workstation within the network and you can connect via enterprise manager or sql analyzer also any tool utilzing OLE, ODBC database standards.
On a public IP you have to designate the port via your firewall. Microsoft default is 1433. e.g. 192.168.1.1:1433
Looking for consultant check out my site. I think my profile designates location.
Best Regards,
Bob Zagars
|
|
|
|
|
I have a storeproc contain this script (I retype so maybe have some incorrect syntax) :
create storeproc Pro
@strLinkedServerName varchar(200)
As
set @sql = 'sp_addlinkedserver ' + @strLinkedServerName
sp_executesql @sql
set @sql = 'Select * from ' + @strLinkedServerName + '.dbo.Northwind.Customer'
sp_executesql @sql
You see I must always use dynamic sql to execute a query to get the Linked server name dynamically. But when use dynamic sql, it's hard for me to check the syntax, and some times it take longer time to execute these query.
So I would like to have a mapping name to linked server. For example, I have a mapping name (like constant that affect to all store in one DB, it's similar to the way you declare a variable in webconfig file and can get it from every where) that we can set somewhere, Constant = "ServerA" (linked server name).
so in my proc I can write script like this :
create storeproc Pro
As
set sp_addlinkedserver Constant
Select * from Constant.dbo.Northwind.Customer'
If you have any idea about it please tell me. Thank you very much,
Hieu Tang
|
|
|
|
|
pls i need some sample application that could help me understand the process of inserting data using ADO.Net into the database
welbert
|
|
|
|
|
I've built up a Windows 2003 Enterprise Server and installed the SQL
Server 2005 Developer Edition. For some reason in the server
configuration MMC there's no "Network Connections" to expand and enable
TCP/IP connections. I just read that different versions of SQL Server
disable that feature depending on (what it didn't say)... However I
installe it on my desktop (XP SP2) and have that feature but my
development server doesn't.
Is something wrong with the install or is this by design that the
developer edition will not allow network connections on a server grade
operating system? If that's the case thanks Microsoft so much for being
able to test...
Some assembly required.
Code-frog System Architects, Inc.
|
|
|
|
|
Rex,
Looks like its a configuration issue according to this site.
SQL Server 2005 Features Comparison[^]
[snip]The table below presents details about each of the editions. Not included in the table are SQL Server Developer and Evaluation editions; these editions have the same features as the SQL Server Enterprise but have different licensing policies.[/snip]
I have not yet had an opportunity to dig into the SQL server edition I received from the VS launch event. My server is horribly under powered for SQL server 2005, so I'm not sure how the configuration is hosed up.
[edit]On second thought, perhaps Dev edition isn't licensed to run on a Server?[/edit]
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
-- modified at 7:12 Wednesday 18th January, 2006
|
|
|
|
|
I have installed the Sql Server 2005 and after installing without any problems I am trying to connect to the server instance but there is an error, it could not connect and blah.
I have tried to make a new instance with
Start /wait <dvd drive="">:\Servers\setup.exe /qb INSTANCENAME=MSSQLSERVER ADDLOCAL=SQL_Engine,SQL_Replication SAPWD=<pass>
Same install without problem until it is almoust finished and an error appears:
TITLE: Microsoft SQL Server 2005 Setup
------------------------------
The computer running SQL Server Setup does not meet minimum system requirements for this SQL Server release.Microsoft SQL Server is not supported on this operating system. For details, see Hardware and Software Requirements in the readme or in SQL Server Books Online.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=28018&EvtType=sqlca%5csqlcax.cpp%40DetectSKUOS%40DetectSKUOS%40x6d72
------------------------------
BUTTONS:
OK
------------------------------
I have fowlowed the link but there is nothing.
I have AMD64 1GB RAM HDD SATA 160GB WinXP PRO SP2
PLS PLS PLS PLS HELP
"Tow things are infinite,
the Universe and human stupidity,
and I am not so sure about the former!"
Albert Einstein
|
|
|
|