|
If it's that urgent, ask the people who wrote Crystal Reports.
A 10 second Google search for "crystal reports invalid tlv record" came up with lots of possibilities. This[^] result list even limits the search to BusinessObjects own site, the people who wrote Crystal Reports.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I have a requirement where I need to create a scheduler, which will do
1) Browse and select a DLL (ActiveX DLL) from the file system.
2) Show all the classes from the DLL on a drop down.
3) if we selected a particular class from the drop down then show another drop down with all the public methods in that class
4) If we select a method from the drop down then show all the parameters.
Now allow the user to input the values for the parameters. and set a time a date to run.
All these stuff goes to an XML.
UP TO THIS I HAVE MANAGED TO DO
And the scheduler will read this and run the selected method for the selected class for the selected dll using the given values for the method parameters.
Basically I would like to know how to run a DLL method dynamically from a VB6 code. Remember I am getting DLL name, Class name, Method name, parameters and the respective values from an XML as strings. How we can execute this in VB6? if not possible in VB6, is it possible in VB.NET? how?
Following are the sample code I used to read Tlb stuff from the given dll to form the xml for my scheduler... Please help me thanks!
-----------------------------------------------------------
Dim objtlb As New TLI.TLIApplication
Dim objTlbInf As TLI.TypeLibInfo
Dim objSearch As TLI.SearchResults
Dim objMemberInfo As TLI.MemberInfo
Dim Ob As Object
Dim tliApp As TLI.TLIApplication
Dim tliIrf As TLI.InterfaceInfo
Dim tliMI As TLI.MemberInfo
Dim sDLLFileName As String
Private Sub cmbDLLCoClassesList_Click()
On Error GoTo err:
Set tliApp = New TLI.TLIApplication
Dim tliMI As TLI.MemberInfo
Set Ob = CreateObject("MYTEST." & cmbDLLCoClassesList.Text)
Set tliIrf = tliApp.InterfaceInfoFromObject(Ob)
cmbDLLMethodsList.Clear
lstParam.Clear
For i = 1 To tliIrf.Members.Count
cmbDLLMethodsList.AddItem tliIrf.Members(i).Name
Next i
cmbDLLMethodsList.ListIndex = 0
lstParam.Clear
For j = 1 To tliIrf.Members(1).Parameters.Count
lstParam.AddItem tliIrf.Members(1).Parameters.Item(j).Name
Next j
lstParam.ListIndex = 0
Set Ob = Nothing
Exit Sub
err:
cmbDLLMethodsList.Clear
lstParam.Clear
End Sub
Private Sub cmbDLLMethodsList_Click()
lstParam.Clear
For j = 1 To tliIrf.Members(cmbDLLMethodsList.ListIndex + 1).Parameters.Count
lstParam.AddItem tliIrf.Members(cmbDLLMethodsList.ListIndex + 1).Parameters.Item(j).Name
Next j
End Sub
Private Sub cmdLoad_Click()
sDLLFileName = "D:\MYTEST.dll"
Set objTlbInf = objtlb.TypeLibInfoFromFile(sDLLFileName)
Set objSearch = objTlbInf.GetMembersWithSubString("")
cmbDLLCoClassesList.Clear
For i = 1 To objTlbInf.CoClasses.Count
cmbDLLCoClassesList.AddItem objTlbInf.CoClasses.Item(i)
Next
cmbDLLCoClassesList.ListIndex = 0
End Sub
-----------------------------------------------------------------------------------
Davis
|
|
|
|
|
Do all your dll's implement an interface? I am not sure a way of doing this in VB 6.0
In VB.NET you can use reflection.
Mike Lasseter
|
|
|
|
|
Thanks. I found how to do this. we can use the "CallByName" in VB6. the Method Signature is as follows.
-----------------------------------------------------------------------------------------
CallByName(Object as Object,ProcName as String,CallType as VbCallType,Args() as Variant)
where CallType can be
VbLet
VbGet
VbMethod
VbSet
-----------------------------------------------------------------------------------------
-Davis
|
|
|
|
|
hi,
how to set hyperlink on database field in crystalreport, so when i click on that,respected new report will be generated from that field clicked.
or
how to give hyperlink for whole row (all the fields are included in that row,like yahoo mail).so, whole row is getting selected when clicked anywhere in row.
It's urgent.so, Plz give me reply.
Thanx in advance,
Regards,
Sweety Shah.
sgshah
|
|
|
|
|
How can i build mail receiving and mail sending application in VB. what components will b needed pls suggest?
thanx
|
|
|
|
|
|
hi everybody
I want to add a combobox as one of the column in datagrid.if anybody know how to add combobox in datagrid please help me its urgent
Thanks
|
|
|
|
|
i want to pass the query string in javascript function hen i use the following code :-
Dim popupScript As String = "" + "window.open('popup.aspx?ID=" + id + "', 'CustomPopUp', " + "'width=550, height=550, menubar=no, resizable=no')" + ""
Page.RegisterStartupScript("PopupScript", popupScript)
then it give me the following error:-
ERROR - "Conversion from string "wi" to type 'Double' is not valid."
please give me the solution
|
|
|
|
|
My guess would be that id is declared as a double?
Mike Lasseter
|
|
|
|
|
mr_12345 is right. Since you're using the addition operator and you have a number in the expression, you're actually trying to add a string to a Double. Use the string concantenation operator, "&" instead. Better yet, minimize using it as much as possible.
Dim popupScript As String = "<script language='javascript'>window.open('popup.aspx?ID=" & _
id.ToString() & "', 'CustomPopUp', 'width=550, height=550, menubar=no, resizable=no')</script>"
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have created a project in vb.net which contains three forms named Form1,
Form2, Form3. In runtime i will read form name based on customer input from a table. but this is in string format, like strFormToDisplay = "Form2", how can i show this form from this string, form2 is already included in project, but i can't create a form object using this string
can u pls help me
regards
ajo
|
|
|
|
|
You have 2 choices:
select case FormToDisplay
case "Form1"
dim form as new Form1
case "Form2"
dim form as new From2
case "Form3"
dim form as new Form3
end case
form.Show
or
Look at using reflection.
Mike Lasseter
|
|
|
|
|
Hi there ,
Can anyone tell me what apppath does? Can I give apppath to my database in VB 6.0. If yes, then what will happen if I change my location of the database from one server to another, and what should I do if in future I want to change my path of the database?
Plz help me out.
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
AppPath gives you the directory path of your executable.
If using VB6, you can put your connection string in an ini file or the registry. If using .Net then you can put it in the app.config file or the registry. This way you can easily move your database without recompiling your code.
Mike Lasseter
|
|
|
|
|
Hi,
Sorry but I don't know ur name. First I would like to thank u for ur quik response.But I would b requiring some more help.Plz help.
I would like to know in wich ini file should I save the database path,Will I need to give additional attributes of the database like USERID,PASSWORD,LOCKTYPE in that file, and How should I execute that file from the application?
Thanx & Regards.
Success is not a Destination,
... But a Journey !!
|
|
|
|
|
You can create your own ini file. Example appliationName.ini. I would place this file in the same directory as your executable.
As far as placing the user name and password in this file, I don't recommend it (unless you perform some kind of encryption on the password).
Are you using one user id to connect to your database or will everyone that logs in have a different user name and password? What kind of database are you trying to connect to?
As for reading and writing to an ini file look at the following link or do a search on google
http://www.vbcity.com/forums/topic.asp?tid=20423
|
|
|
|
|
Dear all
I need your favor due to my case, I wondering know how to write Select Command with two condition. here is I give you my description about my need in my form there in two textbox (textbox1 and textbox2) could you tell me how to write the Select command to involved both of that Textbox using "And" ?, so far I only know one condition for select command as the follow word"
" Select * from table1 where (idno='" & textbox1.text & "')",conection)
and now I need to combine select command for access textbox1 and textbox2 value.
Thank you
Best regards
ICE
|
|
|
|
|
"Select * from table1 where (idno='" & textbox1.text & "' and idno='" & textbox2.text & "')",
nave
|
|
|
|
|
Need some direction; through vb.net can you use DDE links directly? I know that they are used in Excel. Where can I go to get information on working with FIX/API? Can you use Active-X controls in vb.net? Just a web site or book. Thank You
|
|
|
|
|
machman1 wrote: through vb.net can you use DDE links directly
No. There is no support for DDE in the .NET Framework. YOu'll have to P/Invoke the appropriate Win32 functions to use DDE.
machman1 wrote: Where can I go to get information on working with FIX/API
Google search results[^].
machman1 wrote: Can you use Active-X controls in vb.net
Yes. Just add it to the ToolBox. Right click in the ToolBox, then pick Add/Remove Items... Find your ActiveX control on the COM tab and you'll be all set to drop it on your form.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi.
is there anyway I can track when user opens a file? I don't need to know creation, modification, and deletion because I'm already using FileSystemWatcher for that. I used LastAccess filter but it seems doesn't work or maybe it does but I cannot see it. All I need to know that user opened the file and let's say reads it.
My program writes all events to the flat file so I can see all events raised.
Thank you in advanced.
Alex.
-- modified at 16:17 Friday 21st April, 2006
|
|
|
|
|
There is no event for this. You'd have to hook the file system, just like FileMon does.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
g = Graphics.FromImage(bmp)
g.TranslateTransform(pb.Width / 2, pb.Height / 2)
g.DrawEllipse(New Pen(color.MediumTurquoise, 1), 0, 0, 2, 2)
g.DrawRectangle(New Pen(color.FromArgb(0, 0, 0)), 0, 0, 100, 100)
g.DrawEllipse(New Pen(Color.Red, 1), 0, 0, 100, 100)
cntnr = g.BeginContainer(rect1, rect2, GraphicsUnit.Pixel)
g.TranslateTransform(20, 20)
g.Clear(BackColor)
g.DrawRectangle(New Pen(Color.FromArgb(255, 255, 255)), 0, 0, 100, 100)
g.EndContainer(cntnr)
g.DrawLine(New Pen(Color.Blue, 1), 0, 0, 200, 200)
I am confused by losing all of my scratches before the "BeginContainer" because of the "Clear(BackColor)",why?
tczhang
|
|
|
|