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 0) this.cboServers.SelectedIndex = 0; else this.cboServers.Text = ""; } 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.
minhnguyen08
Posts
-
Get name of SQLserver 2000 with VB.net 2003 -
how to load image in picture boxI think, you should use ReadStream or WriteStream to read and write picture such as with the image field you use ReadStream to read image on the database after that you set the picturebox=ReadStream, OK! good luck
-
Textbox drop Focus on ENTER keyYou can use Textbox_presskey event. Such as if keypress =13 then textbox.background=...... textbox2.focus end if
-
Get name of SQLserver 2000 with VB.net 2003Hi! Counld you help me please? I want to get the name of SQLServer 2000 and put it into a combobox, SQLServer may be on my computor and may be on Server in my network (my computor is a workstation but it has SQLServer 2000 too). How can I do that, I until use vb.net 2003 Thanks a lot.
-
Detect SQLServer Name on my networkHi! everybody. How can I get the name of SQL Servers on my network. When I load main form, I want to get SQL servers name into combobox and the user can choose which server they want to use. Could you help me please. Thanks in advance.
-
mdi application errortrying again dim frm as childform Click_event... frm =new childform frm.mdiparent=me frm.show :)
-
Running file help.chmI have a file help.chm combine with my project, when runtime i press F1 it's OK. How can I use menuitem to run it(I create a menuitem and I want to run it everytime i press this menuitem) plz help me. Thanks
-
Set Value On Column of GridViewHow can i set value for Column1 when value of column2 changed on a row?:confused:. I need your help, Plz help me. Thank you very much.
-
Control MenuItem on MDI applicationI'm a senior student. I'm making graduation report so I need your help! I have MDI application with MainMenu on FormMain. When runtime i opened a childform,i do something on it and i want to control(enable/disable) some of MenuItem on MainMenu. This is my code: //////Module///// Module class...... public sub ControlMenu(Byval mnu as system.windows.forms.form.MenuItem,Byval bool as boolean) mnu.enable=bool end sub ........ End class ////////FormMain//// Class FormMain ..declare some var ... private child as ChildForm ..... //event MenuItem childform.click() private sub childform_click(byval sender as object, byval e as ...)Handle childform.click child =new childform child.MdiParent=Me child.show() end sub .... End Class /////ChildForm////// Class ChildForm ..do something //set a MenuItem Me.parent.ControlMenu(NameOfmnuItem,fasle) //Close child form Me.close (or Me.hide) End Class But I get an error or ControlMenu not declare this show up whenever i move mouse on Me.parent.ControlMenu(NameOfmnuItem,fasle). Everybody help me Plz. Thanks
-
Get Handle of FormsI had a MDI project with multi ChildForm. I openned multi ChildForm. How can I get the Handle of these ChildForms? Help me Plz. Thanks
-
Combobox on GridViewI created ChildForm with ControlView had multi Cells on it. One cell of them, I want to add a Combobox. When I clicking on Combobox then show droplist will get data from a table on my Database. I'm VB.NET beginner, Plz help me. Thanks.:((
-
open MDIChildpublic formMain class .... dim frm as childform frm.mdiparent=me frm.show() ..... end class :-D
-
Control Menu on MDI?I have a MainMenu with multi MenuItem on it. I want to disable that menuitem when that childform open. And enable that menuitem when childform close. How can I control it. Plz help me Thanks a lot.
-
Please, Help me......DatagridThanks for your help. I used design mode to created oledbadapter, oledbconnection, dataset and combine with a table on SQL Server 2000. When I press Tab key to enter a new row on datagridview but I can't check a old row. Could you help me and give me code demo. Thanks.
-
Please, Help me......DatagridI want to input value on datagrid, but I don't know how to check the primary key (when it's empty or duplicate). If have error message I want to display my error message not error of window. please... Thanks a lot.
-
How to update database using values in textboxesHi!Mohit Namdeo. All steps right but not enough. When you input on textboxs then datas only update on dataset no update on database. so you must do that. here code on button update be sure the connection,dataset,oledb...are created. private sub update_click(...) { oledb.update(dataset) } end sub good luck:rolleyes: