473,398 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Recommended method to obtain SQLDataPath

I know the default data path on a SQL7 server is defined in the
registry key SQLDataPath. I want to be able to determine the default
data path in a VB.NET application on the local machine and remote
machines. Is using the Registry Class the best way to do that or is
there a SQL command that can tell me? I have read about xp_regread but
I can't find it documented anywhere and I do not know what parameter
list it is expecting. I thought this path may be in an Information
Schema view, but I can't find it.

Thanks for any help.
Jul 20 '05 #1
2 1983

"Zack Sessions" <zc********@visionair.com> wrote in message
news:db**************************@posting.google.c om...
I know the default data path on a SQL7 server is defined in the
registry key SQLDataPath. I want to be able to determine the default
data path in a VB.NET application on the local machine and remote
machines. Is using the Registry Class the best way to do that or is
there a SQL command that can tell me? I have read about xp_regread but
I can't find it documented anywhere and I do not know what parameter
list it is expecting. I thought this path may be in an Information
Schema view, but I can't find it.

Thanks for any help.


There's no SQL command to do that - the SQLDMO Registry.SqlDataRoot property
is probably the best option.

xp_regread isn't documented, so it's not really a good idea to rely on it
(in fact, SQLDMO uses another undocumented proc called xp_instance_regread
to get the path).

Simon
Jul 20 '05 #2

"Simon Hayes" <sq*@hayes.ch> wrote in message
news:41********@news.bluewin.ch...

"Zack Sessions" <zc********@visionair.com> wrote in message
news:db**************************@posting.google.c om...
I know the default data path on a SQL7 server is defined in the
registry key SQLDataPath. I want to be able to determine the default
data path in a VB.NET application on the local machine and remote
machines. Is using the Registry Class the best way to do that or is
there a SQL command that can tell me? I have read about xp_regread but
I can't find it documented anywhere and I do not know what parameter
list it is expecting. I thought this path may be in an Information
Schema view, but I can't find it.

Thanks for any help.


There's no SQL command to do that - the SQLDMO Registry.SqlDataRoot
property is probably the best option.

xp_regread isn't documented, so it's not really a good idea to rely on it
(in fact, SQLDMO uses another undocumented proc called xp_instance_regread
to get the path).

Simon


I just noticed you're using SQL 7 - xp_instance_regread probably doesn't
exist there, as I guess it's an instance-aware version of xp_regread for SQL
2000. But you may want to consider the question of multiple instances if you
will ever use your application with SQL 2000 in future - that would be
another reason in favour of SQLDMO.

Simon
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: comp.lang.php | last post by:
/** * Filter results according to given instruction * * @access private * @param object $result (reference) * @return object $filteredResult */ function &filterResults(&$result) { //...
9
by: jaden10001 | last post by:
I have read that the function.caller method is now depricated. I see alot of browsers still support it but Opera 7 does not. Is there a way to get the name of the caller of a function in Opera 7?
2
by: Eirik Eldorsen | last post by:
What is the recommended method to add a row to a db? I've used the following code since I started using ASP.NET. It's simple, but it gets very hard to manage when the tables get big. And I have to...
2
by: Francois Soucy | last post by:
Hi all! When I write so code I always have some toolTip text for method arguments that help me to know what jind of object and some "hints" I've to write. How I can obtain this same thing( when I...
5
by: OneFang | last post by:
Hi I hope I make sense here. I want to be able to obtain the name of the method that calls a method within my class. So If I have my class that has a method LogInfo() And my client code...
1
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem:...
13
by: Michael M. | last post by:
In Perl, it was: ## Example: "Abc | def | ghi | jkl" ## -"Abc ghi jkl" ## Take only the text betewwn the 2nd pipe (=cut the text in the 1st pipe). $na =~ s/\ \|(.*?)\ \|(.*?)\ \|/$2/g;...
2
by: ME | last post by:
How would one obtain the parameter VALUES of a method that has already run? I can find the method using the StackTrace and StackFrame classes but once I find the method I would like to obtain the...
0
by: DKn | last post by:
Hi all, I am trying to do Software upgradation using Win32_Product -Upgrade method in C#.Net. Here is the code. using System; using System.Management; using System.Windows.Forms;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.