Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / June 2005

Tip: Looking for answers? Try searching our database.

SQL-Server / Databases

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ingo Manthey - 26 Jun 2005 17:10 GMT
Hi,

I am very new with programming in C#.
My problem:
I want to find all MS.SQL-Server Names and displayed in a combobox.

I looking 4 days long in the help, but I don´t find a answer.

later I want find all Databases with in a SQL-Server.

thanks for any help.

regards  Ingo
PaulX - 26 Jun 2005 17:53 GMT
You will need to register the SQLDMO DLL in your application before that
capability is easily visable. Once Registered, you will have the capability
to see the SQL Servers in your environment.

> Hi,
>
[quoted text clipped - 9 lines]
>
> regards  Ingo
Ingo Manthey - 27 Jun 2005 00:04 GMT
Hi  tanks for your help!!!!

But I need more help because all help by the sql server are written for c++.
I have wrote my programms with delphi and don´t no know c++.

Just know I have found what I need from the SQLDMO.DLL_

Application
ServerList = Application.ListAvailableSqlServers
ServerList .Count
ServerList Item[i].
there I can fond the Servers.
If  I want the names of the databases I need:
SQLServer
SQLServer.connect
SQLServer.Databases.Count
SQLServer.Databases.Item[]
SQLServer.Systemobject

But I do not know who I put it in the C# ??
In the help vom Visual C# there I am not found anythink.

Thanks for your help.

Best regards

Ingo

> You will need to register the SQLDMO DLL in your application before that
> capability is easily visable. Once Registered, you will have the
[quoted text clipped - 14 lines]
>>
>> regards  Ingo
PaulX - 27 Jun 2005 11:13 GMT
After you have a new C# project, right click on references in the solution
explorer and select "add reference". when the dialog box comes up, navagate
to the "COM" tab and move down the the Microsoft SQLDMO entry and select add.

Then all of the items available within the DLL are available to your
program. It seems that you have found the correct entries already. If you use
the Object Browser, you can find the correct syntax to use each. (Menu item
View\Object Browser).
There are also many samples available on the internet.

Paul

> Hi,
>
[quoted text clipped - 9 lines]
>
> regards  Ingo
Ingo Manthey - 27 Jun 2005 14:28 GMT
Hi Paul,

thanks for your help and just now I am added the SQLDMO into my project. But
just I becam a new problem because I am writing a bib with a strong name.
What can I do just now ?

best regards

Ingo
> After you have a new C# project, right click on references in the solution
> explorer and select "add reference". when the dialog box comes up,
[quoted text clipped - 25 lines]
>>
>> regards  Ingo
Ingo Manthey - 27 Jun 2005 17:10 GMT
At frist time very mutch thanks for your help.

just now I´m a litle bit further.
I test with the al.exe to give the sqldmo.dll a strong name. But if I would
like to import the dll at once. I became a error that is not a COM Object. I
don´t find more information in the internet oder in the helpfile.

Sorry I am very, very new by programming with .NET. later I wrote programms
more than 10 years with Delphi.

best regards

Ingo

> After you have a new C# project, right click on references in the solution
> explorer and select "add reference". when the dialog box comes up,
[quoted text clipped - 25 lines]
>>
>> regards  Ingo
Ingo Manthey - 28 Jun 2005 03:55 GMT
Hi,
just now I found a way.
In my assemblyinfo I remove the AssemblyKeyFileAttribute.

If I have compiled my bib then I make the strong name with the al.exe

Thanks for helping

best regard

Ingo

> At frist time very mutch thanks for your help.
>
[quoted text clipped - 41 lines]
>>>
>>> regards  Ingo

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.