473,785 Members | 2,484 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQLDMO away return NULL

I tries to search for SQL server using SQLDMO, but it alway return null
although I have updated SQL to sp3

Please tell me more.
Nov 16 '05 #1
3 1414

"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
I tries to search for SQL server using SQLDMO, but it alway return null
although I have updated SQL to sp3

Please tell me more.


Show some code.

/Fredrik
Nov 16 '05 #2
These line of codes are what I have done. Please help me to check them.
I think they are correct, because they perform correctly when I connect to
another computer, but I've not found what the problems are.
Thanks
------------------------------------------------------------------------
private void findSqlServ()
{
try
{
SQLDMO.Applicat ion sqlApp = new SQLDMO.Applicat ionClass();

SQLDMO.NameList sqlNamelst = sqlApp.ListAvai lableSQLServers ();

this.cboServer. Items.Clear();

for (int i=1; i<=sqlNamelst.C ount; i++ )
{
object srv = sqlNamelst.Item (i);

if ( srv != null )
{
this.cboServer. Items.Add(srv);
}
}

if ( sqlNamelst.Coun t == 0 )
{
this.cboServer. Text = strNull;
}
else
{
this.cboServer. SelectedIndex = 0;
}
}
catch (Exception ex)
{
MessageBox.Show (ex.Message);
}
}

------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////////////////////////////////

"Fredrik Wahlgren" <fr************ ****@mailbox.sw ipnet.se> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl...

"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
I tries to search for SQL server using SQLDMO, but it alway return null
although I have updated SQL to sp3

Please tell me more.


Show some code.

/Fredrik

Nov 16 '05 #3
I find out what the problem is
Simple, It needs a network

"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:e1******** ******@TK2MSFTN GP14.phx.gbl...
These line of codes are what I have done. Please help me to check them.
I think they are correct, because they perform correctly when I connect to
another computer, but I've not found what the problems are.
Thanks
------------------------------------------------------------------------
private void findSqlServ()
{
try
{
SQLDMO.Applicat ion sqlApp = new SQLDMO.Applicat ionClass();

SQLDMO.NameList sqlNamelst = sqlApp.ListAvai lableSQLServers ();

this.cboServer. Items.Clear();

for (int i=1; i<=sqlNamelst.C ount; i++ )
{
object srv = sqlNamelst.Item (i);

if ( srv != null )
{
this.cboServer. Items.Add(srv);
}
}

if ( sqlNamelst.Coun t == 0 )
{
this.cboServer. Text = strNull;
}
else
{
this.cboServer. SelectedIndex = 0;
}
}
catch (Exception ex)
{
MessageBox.Show (ex.Message);
}
}

------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////////////////////////////////

"Fredrik Wahlgren" <fr************ ****@mailbox.sw ipnet.se> wrote in
message news:Oc******** ******@tk2msftn gp13.phx.gbl...

"Dean L. Howen" <co*****@hotpop .com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
I tries to search for SQL server using SQLDMO, but it alway return null
although I have updated SQL to sp3

Please tell me more.


Show some code.

/Fredrik


Nov 16 '05 #4

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

Similar topics

3
2439
by: Verve | last post by:
Hi, how to create an SQL DMO object in .net and use it to enumerate the properties of Sql server. Can we use this object to list properties without logging in to the server?
1
6342
by: Mohammed Abdel-Razzak | last post by:
Dear sirs I`ve used SQLDMO to make a backup to my database How can I use it to restore database? thanks Mohammed
3
5313
by: T. | last post by:
I dumped VB and adopted C# for this version of Visual Studio. My problem! I am trying to reference an SQLDMO.Database object in C# like so: private SQLDMO.Database dbcurrent; private string dbname; dbname = "Northwind"; dbcurrent = (SQLDMO.Database)sqlsvr.Databases.Item(dbname); But I get this error : No overload for method 'Item' takes '1' arguments.
2
1949
by: | last post by:
Hi all, I am trying to get a reference to SQL Server Agent from C#. I have referenced SQLDmo.dll in my project. The SQLDmo documentation says SQLDMO.JobServer instance would be a reference to SQL Server Agent. From my C# project, however, SQLDMO.JobServer is shown as an interface and hence I am not able to create an instance of SQLDMO.JobServer. Any help is appreciated. Thanks.
1
7565
by: | last post by:
Hi all My requirement is to "on button_click, backup a SQL database using SQLDMO.Backup object and update the progress in a ProgressBar. The problem is the progress bar does not update at all until the very end of the backup process, when the backup is almost going to be over, the progress bar updates itself once on a stretch, which is no use,it is not showing any progress. SQLDMO documentation says, the SQLDMO.Backup object fires
2
5521
by: | last post by:
Hi all, continued from yesterday's posting... I still haven't found a solution to this issue. I put a breakpoint in private void SqlBackupPercentComplete(string message, int Percent) { progressBar1.Value = Percent; progressBar1.Update(); }
1
2558
by: | last post by:
Hi all I am posting this to check if anyone could help me. The problem still persists. I am beginner in C#. Thanks. Subject: SQLDMO.Backup and ProgressBar - help please From: "anonymous@discussions.microsoft.com" <anonymous@discussions.microsoft.com> Sent: 11/11/2004 5:52:10 AM
6
11491
by: Henry Padilla | last post by:
I am trying to use SQLDMO in C# and it's a nightmare. Any examples, suggestions, is there a different (managed) way to do this that I don't know about? Thanks for the help. Tom Padilla
3
2592
by: Nils | last post by:
I use SQLDMO.Bulkcopy in an VB6 (have to) program to load data from a plain text file into a SQL Server 2000. One of the target columns is NOT NULL but it happens that I receive a missing value for that column in the source file. BulkCopy then has an ODBC error raised that complains about the violated NOT NULL constraint. The Bulkcopy error file however is empty. Is there a way to figure out in which row of the source file the error...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6739
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.