|
i have an lan where i can get all the computer names unto a certain treeview
actually i want to be able to get their informations like ip addresses using iphostentry by selecting that particular node
i get the text correctly representing the machine name on the network and i do something like this
dim ip as new iphostentry
ip=dns.gethostentry(treeview1.selectednode.text)
dim compip as string=ip.addresslist(0)
Actually i get an error saying that "HOST UNKNOW", NO SUCH HOST EXISTS"
Any help?.Thanks
phatkin
|
|
|
|
|
You probably have to supply the full DNS name, not just the machine name. Like this: someComputer.myCompany.com . This, of course, depends on your DNS, or Active Directory if you have it, structure.
|
|
|
|
|
I am developing an application in VB.NET on the .NET framework v2.0, that consists of 2 parts. The client part, which is installed on the Client pc and the server part which is installed on the server (obviously)
The client part consists of a form containing a menuStrip, ToolStrip and an Explorer bar, all of which have no options as they are added to each of the controls at run-time, from an XML configurarion file located on the server. The server install also includes all the DLL that contain the Business logic. The client app connects to the DLLs ,on the server, using late binding.
All is working well when running locally on my PC, but as soon as I but the server part of the app onto my testing server, the .NET Framework security kicks in and stops the app from loading the DLLs from the server.
I would be grateful for any assistance on how to resolve this problem.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
It doesn't work because in the .NET Framework, code running from a non-local source (i.e.: Network) is not trusted. Read up on Code Access Security[^] to learn about how to control trusting foreign sources.
|
|
|
|
|
Hey I was wondering if anyone can help me?
I want to export data from VB 6 to an excel spreadsheet.
Any Help?
Cheers
|
|
|
|
|
A little Google goes a long way[^]. There's plenty of examples out on the web. All you have to do is a little searching.
|
|
|
|
|
I am assuming everyone...well most everyone here knows what datagridview looks like. On the control to the very left, there is something like a column that has an arrow type symbol in it and whenever a row is selected, that symbol is at the beginning of the row. I think it's called something like a row selector or something. Anyway, I was wondering what it is and how to get rid of it if possible.
|
|
|
|
|
I think it is Rowheader and there is some properties in datagridview property .
|
|
|
|
|
Yep, that was it, thanks enmahdi
|
|
|
|
|
I want to get tables Name in a Access (mdb) file and my quary is
"select * from msysobject where type = 1 and flags = 0"
but the exeption with the text " Records can not be read ; no permision on'msysobjects'"
has happend
please help me about this problem .
|
|
|
|
|
hi,
use following code
here cnn is connection object
Dim Schema As DataTable = cnn.GetOleDbSchemaTable _<br />
(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})<br />
<br />
For Each row As DataRow In Schema.Rows<br />
If Not row.Item(2).ToString.StartsWith("~") Then<br />
Me.ComboBox1.Items.Add(row.Item(2).ToString)<br />
End If<br />
Next
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Hi,
I imported the data into excel. For this purpose I have added a micorosoft.excel com file as a reference and imported Microsoft.Office.Interop
The problem is while run the exe in the target machine, it is showing an
error, It couldn't find the file "Microsoft.office.Interop."
Please advise me.
Ahamed Azeem
Software Programmer
Saudi Postal Technologies – Riyadh
|
|
|
|
|
Have you included the Microsoft.Office.Interop.DLL into your deployment package?
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thank you for ur immediate response.
Is any other way to make this file available in the target machine other than include to deployment package?
Ahamed Azeem
software Programmer
|
|
|
|
|
Try copying the DLL to the target machine, then on the target machine run RegSvr32 to register the DLL
for example
RegSvr32 C:\MyProject\Microsoft.Office.InterOp.DLL
It may work, but creating a deployment package is proberbly your best bet.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi
Please tell me in some lines of code.How can I perform differnt actions for controls that I have created at runtime.e.g. display the name of control.
Code snippet is
Dim x, y As Integer
For i As Integer = 1 To 10
y += 25
btn = New Button
btn.Location = New Point(x, y + 25)
btn.Size = New Size(70, 25)
btn.Name = "Button" & i.ToString
btn.Text = "Button" & i.ToString
Controls.Add(btn)
AddHandler btn.Click, AddressOf btn_Click
Next i
Private Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs)
'Display the control name that was clicked
End Sub
reman
|
|
|
|
|
sender is a Button
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Cast sender to a Button.
Dim btn As Button = DirectCast(sender, Button)
|
|
|
|
|
i have a database of lists of subjects...then in my module, i want to display all the subjects that i recorded in the listbox...
how can i do it? i already connect my dataset in the connection wizard but i can't display it in the listbox.
|
|
|
|
|
at the first time you should set your listbox datasourse it will be your table in your dataset
and then set displayMember it will be the column name of the table it will be shown to user
and then set valueMember it will be the column name that is not been shown to user .
|
|
|
|
|
Dear everyone.
hope you all will be fine and good in health.
i have a problem that i want to fetch a listbox with names. please help me that what code i have to write.
PICTURE IS HERE;
i have a table STUDENT with attributes (ID, Name, Age)
i have inserted 100 students record into STUDENT tabl
i have a listbox control named lstStdents on my form
now i want that when my form is opened, it should auotmatically fill the listbox with NAME of students
i want to know that how to fill that box using datareader?
thanks
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/haa3afyz(VS.71).aspx
Try like that.
OleDbConnection nwindConn = new OleDbConnection("Provider=MSDataShape;Data Provider=SQLOLEDB;" +<br />
"Data Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind");<br />
<br />
OleDbCommand custCMD = new OleDbCommand("SELECT Name from STUDENT", nwindConn);<br />
nwindConn.Open();<br />
<br />
OleDbDataReader custReader = custCMD.ExecuteReader();<br />
<br />
<br />
while (custReader.Read())<br />
{<br />
<br />
Listbox1.AddItem(custReader.GetString(1) = CompanyName);<br />
<br />
<br />
}<br />
<br />
custReader.Close();<br />
nwindConn.Close();
do searching a lit bit. man.... there are a lot of examples about how to populate the data into listbox in web or our forum....
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Dear Micheal
thanks for nice information
i have writen my code following your pattern but it not works
Dim con As New OleDb.OleDbConnection("Provider=Microsoft.jet.oledb.4.0;Data Source=e:\college.mdb")
Dim query As New OleDb.OleDbCommand("Select * from student")
con.Open()
Dim dr As OleDb.OleDbDataReader = query.ExecuteReader()
While (dr.Read())
ListBox1.Items.Add(dr.GetString(1) = Name)
End While
dr.Close()
con.Close()
please help me more to clear my concept
thanks
|
|
|
|
|
Egoest wrote: Dim query As New OleDb.OleDbCommand("Select * from student")
Select Name from student
Egoest wrote: ListBox1.Items.Add(dr.GetString(1) = Name)
ListBox1.Items.Add(dr.GetString(1))
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi
In my application i am downloading mail pop3 server and using indy socket.
I am having problem if the mail have an attachment.If the mail having and
attachment then while downloading, mail attachment is encode to some
format.I want to again decode attachment to its original format.How can i
do this.Please tell me how to do this.
Thanks.
-- modified at 10:40 Thursday 23rd August, 2007
Rahul
|
|
|
|