|
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
|
|
|
|
|
hello there
i have a file that contain data suchas
ashish sharan dadhich
rupesh kumar swami
asdf zxcv qwer
now i m trying to store every line and every character in the file (text file) in a 2d string array.
and store the data in a excel file like
----------------------------
ashish | sharan | dadhich |
----------------------------
rupesh | kumar | swami |
----------------------------
asdf | zxcv | qwer |
----------------------------
i use the statement
Dim str1 As String() = rtb1.Text.Split(" ")
to store string separated by space, but i don't know how to find the new line char in the line. the previous statement stores the string
str1(0) = ashish
str1(1) = sharan
str1(2) = dadhichrupesh
does some one has as idea to get rid out of that then please tell me .
thnx
hope all of u to understand my problem.
help everyone
|
|
|
|
|
Hi,
I haven't tried this and I am not sure it will work but you could try to split the data in two steps:
<br />
'1. first split the data into lines by line breaks.<br />
Dim lines() As String = rtb1.Text.Split(Chr(13))<br />
Dim words() As String<br />
Dim line As String<br />
<br />
'2. split each line into words and do whatever you want with them.<br />
For Each line In Lines<br />
words = line.split(" ")<br />
'transfer words.GetValue(0) somewhere<br />
'etc<br />
'etc<br />
Next<br />
Hope this works,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hello friends,
i have one query
prepare a vb application with one button install mysql when the user clicks on the install button mys sql setup should run.
How to work on this please can u help me, if u have any sample code please give and help me
Thanks
Praveen Kumar.R
|
|
|
|