|
Hi,
Try simply casting the text to xml datatype and use the result for xml dml operations. Simple case to test that casting actually works:
SELECT CAST( CAST( '<root><node1 value="A" /></root>' as ntext) as xml) XmlTypedColumn
Mika
p.s. You could start a new thread for separate questions
|
|
|
|
|
hi all
i get above error when using this code snippet
Dim svr As Server = New Server()
Console.Writeline(svr.Name & " " & svr.Information.VersionString)
i already import the the SMO as following
Imports Microsoft.SqlServer.Management.Smo
please suggest how can i solve this problem
|
|
|
|
|
Could be the server isn't running, your connection string is not setup right, or firewall.
"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
|
|
|
|
|
hi all,
i am new to SQL Server but little strong in vb.net
i want to create Backup file of any database of SQL server and again restore them to server . So how can i do this task Programmatically. Also what is the option when Authentication mode is Windows or Server or Mix-Mode
|
|
|
|
|
You are not mentioned here SQL Server version.
If you are using SQL2005 then do some research on SQL Server Management Objects (SMO). It provides the all kind of Database management facility including backup and restore.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Windows Authentication uses active directory credentials
Mix mode will also allow standard sql server authentication.
There are pros and cons to both of these, and entire articles/books written on them. We use windows authentication for the developers and admins who need to interact with the database directly and SQL credentials for the applications to interact.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi all,
i am new bie in SQL server
i want to store Database with my application on client machine . However i know i add one for setup for Database but how can get the server name of system (mean SQL server name on client machine). Reason behind this question is that i use server name in connection string as following
Dim ConnectionString As String = "Data Source=s-1\SQLEXPRESS;Initial Catalog=abc;Integrated Security=True"
i use above string .In which server name is "s-1\SQLExpress" . so how can replace this server name to client machine server name?
|
|
|
|
|
I believe this will be the name of your computer unless you can install an instance of SQL Express.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
sir,First of all , i am new bie
actually i dont know what is the configuration of client machine . so i suppose user simply add the database in their Server. and run my application . so how could i get the Server Part in following connection string
Dim ConnectionString As String = "Data Source=s-1\SQLEXPRESS;Initial Catalog=abc;Integrated Security=True"
Here server is S-1
and instance is SQLExpress. Correct me if i wrong
|
|
|
|
|
Nope you do not need correcting. I would make it a prerequisite of your install package - ask the use for the server name to use.
I'm not sure the Express version announces itself to the network like SQL server does. Even if it does, how are you going to pick between the # number of SQL instances on the network. Last I looked we have over 300 SQL server instances on ours.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
sir, i does not properly get you
Are you want to say that I add Database as Prerequiste of Installation Package and After installation of application, when user run the application first time, then it ask for Server Name and store server name in some place like text file or registry ? Please correct me
|
|
|
|
|
I think what he want to say is, your database creation progrom should ask the database information, as sql expressoin cant be reachable accross network, so you also need to change the connection string. after getting the database info you update your configuration file.
|
|
|
|
|
Mycroft Holmes wrote: over 300 SQL server instances on ours
Oh boy.
"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
|
|
|
|
|
Yeah I work for a bank, they have 4 data centers, 2 production and 2 DR. They run 2 discreet networks UAT and production. Deployment is a PITA
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: have 4 data centers, 2 production and 2 DR
Sounded like with that many instances, you are at a good sized shop.
Mycroft Holmes wrote: Deployment is a PITA
I imagine so. helps after a tough day in any shop
"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
|
|
|
|
|
Paul Conrad wrote: you are at a good sized shop.
Yeah but I work in one department and IT hate me, I have a mandate to "get the job done" and worry about enterprise requirements later. Therefore I'm not subject to the endless meetings IT seem to require before they allow you to start coding, it also means there is no such thing as a requirements document either so it has it's drawbacks.
Thanks for the beer, I may wait as it is 9:30 on a Sunday and thats a bit early even for me!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This article, Finding SQL Servers on the Network[^] may be worth looking at. Not sure how it responds to SQL Express or SQL 2008.
The above article is based on odbc, this other one, Enumerating SQL servers on a Network[^] looks good, too.
"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
modified on Saturday, July 26, 2008 9:08 PM
|
|
|
|
|
Hi
I've a Table Table1.And it's structure is
RoleID RoleDescription Department
1 Manager Accounts
2 Senior Manager Finance
and I want to have a Table like
Columnname Columnvalue Date
RoleID 1 2/5/2008
RoleDescription Manager 2/5/2008
Department Accounts 2/5/2008
RoleID 2 2/5/2008
RoleDescription Senior Manager 2/5/2008
Department Finance 2/5/2008
Can anyone tell how?
thanks in advance
Sri
|
|
|
|
|
I realy dont understand what you just asked
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Dear gurus,
I am developing a charting application that should plot [double] values against [DateTime] values. In a single turn, there can be as much as 10 million data points.
What I do is to extract the data from SQL Server and use ChartDirector to plot it. For about 1 million data, extraction takes 25 seconds and plotting takes 20 seconds.
This is a lot of time to wait for user. Can you please suggest me any?
like sampling to reduce the data, or fast extraction, or fast plotting?
Thanking you!
|
|
|
|
|
The obvious one is to reduce the number of data points over the entire time frame IE get 1 data point per week/month. Allow the user to drill into a specific week/month at which time you may show all or data points. You can't actually see 10mio datapoints, the values would become irrelevant over such a large size.
BTW 45 sec to get 10mio rows of data seems eminently reasonable to me.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you, Mycroft Holmes.
But the problem is that I cannot afford to miss out the outliers among the data. If I pick out 1 data poing per month, there is high chance that any outlier may miss out.
Should taking the mean withing the time span solve the problem?
Thanking you.
|
|
|
|
|
mahabir wrote: If I pick out 1 data poing per month,
There is a trading graph the shows hi/low and volume for period per period (Day per year). That will solve your problem. There are at least 3 other methods of displaying the data without dumping our millions of rows!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
By using ADO to deal with excel, I can create the table in Excel successfully, but when I try to insert a new column, the SQL command failed.
ALTER TABLE tablename INSERT COLUMN col1 FLOAT
Why?
system
|
|
|
|
|
Question comes instantly to mind - WHY THE FREAKIN HEEL ARE YOU USING EXCEL AS YOUR DATABASE. Unless there is an overriding business reason to do this you are setting yourself up for a disaster. Please use SQL Express if possible, Access if you really must use office but Excel NNnnnnnooooooo!
Sorry that I cannot help you with this I am not even sure it is possible. Quite possibly I would not even if it is possible!
Never underestimate the power of human stupidity
RAH
|
|
|
|