Click here to Skip to main content
16,011,805 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Obtaining Random Numbers Pin
Christian Graus5-Jan-07 19:13
protectorChristian Graus5-Jan-07 19:13 
GeneralRe: Obtaining Random Numbers Pin
Dave Kreskowiak5-Jan-07 10:06
mveDave Kreskowiak5-Jan-07 10:06 
QuestionGet name of SQLserver 2000 with VB.net 2003 Pin
minhnguyen084-Jan-07 20:47
minhnguyen084-Jan-07 20:47 
AnswerRe: Get name of SQLserver 2000 with VB.net 2003 Pin
Hasan Jaffal4-Jan-07 22:05
Hasan Jaffal4-Jan-07 22:05 
GeneralRe: Get name of SQLserver 2000 with VB.net 2003 Pin
Vasudevan Deepak Kumar5-Jan-07 22:26
Vasudevan Deepak Kumar5-Jan-07 22:26 
AnswerRe: Get name of SQLserver 2000 with VB.net 2003 Pin
Vasudevan Deepak Kumar5-Jan-07 22:25
Vasudevan Deepak Kumar5-Jan-07 22:25 
GeneralRe: Get name of SQLserver 2000 with VB.net 2003 Pin
Hasan Jaffal6-Jan-07 6:43
Hasan Jaffal6-Jan-07 6:43 
GeneralRe: Get name of SQLserver 2000 with VB.net 2003 Pin
minhnguyen0815-Jan-07 19:46
minhnguyen0815-Jan-07 19:46 
Hi!
I had refer that URL, but until get error message
I had reference SQLDMO and declare:
private SQLDMO.Application sqlApp = new SQLDMO.ApplicationClass();
SQLDMO.NameList sqlServers=null;

this is my code:
private void Form1_Load(object sender, System.EventArgs e)
{
try
{
sqlServers = sqlApp.ListAvailableSQLServers();
for(int i=0;i<sqlServers.Count;i++)
{
object srv = sqlServers.Item( i + 1);
if(srv != null)
{
this.cboServers.Items.Add(srv);
}
}
if(this.cboServers.Items.Count > 0)
this.cboServers.SelectedIndex = 0;
else
this.cboServers.Text = "<No available SQL Servers>";
}
catch(Exception err)
{
MessageBox.Show(err.ToString(),"Error");
}
}

and i get an error:

System.InvalidCastException:QueryInterface for interface SQLDMO.NameList faild at SQLDMO.ApplicationClass.ListAvailableSQLServer() at ....

Cuold you help me, please.
QuestionDAAB Wrapper Pin
shreekar4-Jan-07 20:39
shreekar4-Jan-07 20:39 
AnswerRe: DAAB Wrapper Pin
Colin Angus Mackay4-Jan-07 22:32
Colin Angus Mackay4-Jan-07 22:32 
GeneralRe: DAAB Wrapper Pin
shreekar4-Jan-07 22:45
shreekar4-Jan-07 22:45 
GeneralRe: DAAB Wrapper Pin
Colin Angus Mackay5-Jan-07 0:00
Colin Angus Mackay5-Jan-07 0:00 
GeneralRe: DAAB Wrapper Pin
shreekar5-Jan-07 0:40
shreekar5-Jan-07 0:40 
QuestionHow to create a Dynamic Crystal Report using VB.NET and MSSQL Pin
tinh cau4-Jan-07 17:49
tinh cau4-Jan-07 17:49 
AnswerRe: How to create a Dynamic Crystal Report using VB.NET and MSSQL Pin
steve_rm4-Jan-07 21:48
steve_rm4-Jan-07 21:48 
QuestionHow to take file's condents Pin
somagunasekaran4-Jan-07 17:48
somagunasekaran4-Jan-07 17:48 
AnswerRe: How to take file's condents Pin
Christian Graus4-Jan-07 18:04
protectorChristian Graus4-Jan-07 18:04 
GeneralRe: How to take file's condents Pin
somagunasekaran4-Jan-07 19:34
somagunasekaran4-Jan-07 19:34 
GeneralRe: How to take file's condents Pin
Christian Graus4-Jan-07 19:41
protectorChristian Graus4-Jan-07 19:41 
GeneralRe: How to take file's condents Pin
somagunasekaran4-Jan-07 19:54
somagunasekaran4-Jan-07 19:54 
GeneralRe: How to take file's condents Pin
Christian Graus4-Jan-07 20:00
protectorChristian Graus4-Jan-07 20:00 
GeneralRe: How to take file's condents Pin
somagunasekaran4-Jan-07 21:32
somagunasekaran4-Jan-07 21:32 
QuestionHiding rows in a datagridview Pin
steve_rm4-Jan-07 17:46
steve_rm4-Jan-07 17:46 
AnswerRe: Hiding rows in a datagridview Pin
EldieBongers10-Jan-07 22:09
EldieBongers10-Jan-07 22:09 
QuestionProblem Pin
amaneet4-Jan-07 17:18
amaneet4-Jan-07 17:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.