|
Thanks TwoFaced
|
|
|
|
|
I can get the assembly and see the types from within it. But I'm missing the link to see the members of the class. Could someone guide me please?
Dim asm = [Assembly].LoadFrom("stta.dll")
Dim ty As Type = asm.CSPluginClass
Dim Memberinforms() As MemberInfo = Type.GetType(????).GetMembers
What goes where ???? is?
Why not ty?
thanks!
|
|
|
|
|
|
OK, sorry to be stupid. I've read a lot of documentation, but I'm missing this.
My main program needs to find an assembly. The assembly will have one class, and it will have known properties and methods within it.
What is not known ahead of time is the name of the class.
My question is how to call the methods within the class. Presumably I need to get the name of the class somehow.
thanks
|
|
|
|
|
OK, got it... in case it might help anyone
Dim Asm = System.Reflection.Assembly.LoadFrom "myassembly.dll")
'Since there's only one Exported class
Dim ty As Type = Asm.GetExportedTypes(0)
Dim CSPluginClass As Object = Asm.CreateInstance(ty.FullName, True)
Thanks all!
|
|
|
|
|
Hi Guys ,
I am running two applications one of VB6.0 and other with .Net 2005.
When accessing crystal report 9.2 through VB 6.0 application it generates an error.
I tried same VB 6.0 application on other computer without .Net application then it doesn't generate any error.
Kindly send me your suggestions
Thanks in advance.
|
|
|
|
|
What is the error message?
t.aransiola
|
|
|
|
|
hi everyone,
please tell me wht shuld i do?
i m developing application in vb.net(winforms)
On my edit button i want to fill datagridview from taking all records in data,
but when i m going to insert data into combobox it will give me handle dataerror Event.
i wrote following code on Edit button click.
cmd = New MySqlCommand("SELECT t.ID, t.CustID, Project, Task, t.Monday, t.Tuesday, t.Wednesday, t.Thursday, " & _
" t.Friday, t.Total , c.CustName FROM timesheet_details t, cust_mast c WHERE c.CustID = t.CustID " & _
" and id=" & txtID.Text & ";", conn)
reader = cmd.ExecuteReader()
i = 0
Dim j As Integer
j = 0
Do While reader.Read()
j += 1
Loop
reader.Close()
DGTimeSheet.Columns.Clear()
DGTimeSheet.ColumnCount = 6
DGTimeSheet_Design()
DGTimeSheet.RowCount = j
reader = cmd.ExecuteReader()
While reader.Read()
MsgBox(reader(2))
MsgBox(reader(3))
CmbCellProj.AutoComplete = True
DGTimeSheet..Item(1, i).Value= CStr(reader(3)) ''Task
DGTimeSheet.Item(1, i).Value = reader(1) ''Project
DGTimeSheet.Item(3, i).Value = reader(4)
DGTimeSheet.Item(4, i).Value = reader(5)
DGTimeSheet.Item(5, i).Value = reader(6)
DGTimeSheet.Item(6, i).Value = reader(7)
DGTimeSheet.Item(7, i).Value = reader(8)
DGTimeSheet.Item(8, i).Value = reader(9) ''Total
DGTimeSheet.Item(0, i).Value = reader(10) ''CustName
''DGTimeSheet.Item(1, i).Selected = True
DGTimeSheet.Item(0, 0).Style.DataSourceNullValue = reader(2)
i = i + 1
End While
reader.Close()
--Thanks in advance for help
priya
|
|
|
|
|
I assume that this is just your test code, and that you will not ship code that is totally open to SQL injections.
Why are you fetching the data twice? If you need it more than once, fetch into a DataSet or something. Then you don't have to loop through the records to find out how many there are either.
I can't see any code where you try to insert data in any combobox. If you want any help with your error, you have to show the code where it does occur, not some completely different code.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I need to get the name of an instance of class. Perhaps, using reflection?
Below i show the example
class Idle<br />
Public one as int32<br />
end class<br />
<br />
class form1<br />
Dim MyIdle as new Idle<br />
public Sub button1_click(sender,...) handles button1.click<br />
textbox1.text= ?¿<br />
end Sub<br />
end class
How can i get the name 'MyIdle' ??
|
|
|
|
|
hi!
you can't get the variable name. With Reflection you can get types of assemblies, for example. but a variable name is not metadata in a compiled assembly, because a variable is only a location in the ram.
solidIT.de - under construction
Components for Microsoft .Net
audittrail, objectcomparer, deepcopy and much more ...
|
|
|
|
|
Hi 2 All,
Please suggest me,how can insert a ocx control in word document?
Thanks
Arun Kumar
Soft Engg - DOTNET
Arun Kr
|
|
|
|
|
Hi,
I have a page which has Labels and Textboxes. Those textboxes contain data which is coming from a database. I want to be able to export the data in the textboxes into excel. Is there anyway for doing that? Do you know of any site which shows me how to?
Thanks!
|
|
|
|
|
you can use componentOne's tools or either use excel.dll for that.
Lxcite's Planet
... the ultimate solution
|
|
|
|
|
hi,
if you do not need any formatting in your destination excel file you can create a simple text file with the extension xls. you only have to seperate your content throug vbTab and vbNewLine.
solidIT.de - under construction
Components for Microsoft .Net
audittrail, objectcomparer, deepcopy and much more ...
|
|
|
|
|
Hi ,
I am using a property grid to show some controls property and dynamically set them.I want to remove some property or customized some choosed property .How can I do this.Please help me.It is urgent.
thanks in Advance
Sandy
|
|
|
|
|
Don't. Cross. Post.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Thanks For these advice.
I thinks these will solve my problem.
|
|
|
|
|
hello all,
Am working with windowsform Using .net 2005 and sql server.
Am developing an small application regarding payroll. code begin is vb.
my problem is whenever i give details about basicsal, Hra, conveyance etc it will automatically compute netsalary, In netsalry text box maximum length allowed is 8. but it was shown to many numbers in fraction like "2345.901245629871".How can i trim that value to"2345.90" 0r "2346". this is only my problem. am also wrote code for trim the paticular text box value. but it didn't work. please tell me suggetions to solve this problem
|
|
|
|
|
Do you use DataBinding?
Do the number showed in textbox, is allowed to be edited and return to Database?
is String.Format function or Math.Round suitable for u?
|
|
|
|
|
YOU CAN USE FORMAT
Eg:
TXTBOX.TEXT = FORMAT(TXTBOX.TEXT,"####.##")
|
|
|
|
|
Hi,
Or you can just use:
<br />
YourTextBox.Text = Decimal.Round(CDec(YourValue), 2)<br />
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks a Lot it was working Nice....
|
|
|
|
|
Hi;
I m using VB.net. I have inserted the data in SQLSERVER in this form but having this error while trying in Oracle. Im using class for connection
"ORA-01036, Illegal Name/Variable "
this is the Code I m using.
Dim LclsGeneral As New GClsGeneral
Dim fs As FileStream = New FileStream(txtContent.Text, FileMode.Open, FileAccess.Read)
Dim img(fs.Length) As Byte
fs.Read(img, 0, System.Convert.ToInt32(fs.Length))
Dim conn As New OracleClient.OracleConnection
Dim LClscnn As New GClsConnection
conn.ConnectionString = LClscnn.GetConnectionString
If conn.State = ConnectionState.Closed Then conn.Open()
Dim Lcmd As New OracleClient.OracleCommand
Lcmd.Connection = conn
Lcmd.CommandText = "Insert into Test (DOCUMENTID,DOCUMENTCONTENT) VALUES ('" & txtID.Text & "',@DOCUMENTCONTENT)"
Lcmd.Parameters.Add("@DOCUMENTCONTENT", OracleClient.OracleType.Blob,img.Length).Value = img
Lcmd.ExecuteNonQuery()
fs.Close()
txtID.Text = ""
txtContent.Text = ""
Kindly help me
Thank you
|
|
|
|