|
Hello,
I've hit a brick wall and can't find ANYTHING to help me!
I'm creating an Object which has a method that returns a Collection object. This is fine until I want to pass it to a Webservice... then I get the following error...
You must implement the Add(System.Object) method on Microsoft.VisualBasic.Collection because it inherits from ICollection.
Here is an example of my code:
--------------------------------------------------------
Public Class History
Private m_colHistory As New Collection()
Public ReadOnly Property Entries() As Collection
Get
Return m_colHistory
End Get
End Property
Public Sub Add(ByVal Value As HistoryEntry)
m_colHistory.Add(Value)
End Sub
End Class
--------------------------------------------------------
I need to solve this urgently, any will be hugely appreciated!!
Many thanks
Richard
|
|
|
|
|
erm... perhaps you could do what the error is telling you to do ?
Public Sub Add(ByVal Value As Object)
m_colHistory.Add(Value)
End Sub
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I don't appreciate the sarcasm, of course I've tried that otherwise I wouldn't be asking for help!!
|
|
|
|
|
Have you tried using a different data structure, perhaps an ArrayList ?
my blog
|
|
|
|
|
This is my first time deploying a windows application. I am able to deploy it correctly but I need some help with deploying it to a computer which doesn't have the .net framework installed.
I am using visual studio 2002 with framework 1.0.
Most example's only explain the framework 1.1.
How is this done?
Thanks
Beginner in VB.Net
|
|
|
|
|
The machine you deploy your application to must have the Framework installed. The method of installation hasn't changed between 1.0 and 1.1. The examples you found for 1.1 will work with the 1.0 Framework.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I check to see if it does and if it doesn't install framework 1.0?
Dotnetfx.exe can be redistributed with your setup. How do you do this?
Thanks
Beginner in VB.Net
|
|
|
|
|
It's called "bootstrapping". You can't include the .NET Redistributable in the .MSI that contains your application because one of the pre-launch conditions for install is that the .NET Framework already be installed! So, you must use a non-.NET managed application as a Setup program to check for the required software that must be installed, and unpackage and launch the appropriate installers for them, then, lastly, launch the .MSI setup for your application.
See this[^] excellent article on CodeProject for an example and explanation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello
I want to make a wizard like the once in Access where we can find the path and select a database then the table and then the fields we want to work with..Is it possible?
Like is there any kinda ActiveX controll or some software I really would like to know..So if you know please tell me..
Thank you very much..
Have a nice day!
|
|
|
|
|
hi,
Can anyone provide me an example ..on how to invoke COM objects remotely..in three tier environment. (what are the command that i should issue in my vb program for invoke the dll rather than using a manuall add reference.)
Meaning i need to issue a command telling my program where is the dll reside..on other words add runtime reference in my program in order to invoke the COM (dll) file.
thank you
kumar
|
|
|
|
|
Still new to programming. I have a form with a Check box and a combo box. I want to be able to display the Name of the checkbox (ie. Hamburger) and the quantity displayed in the combobox over in the ListView box.
Check Box = chkHamburger
Combobox = cboHamburger (field contains 1,2, 3, 4)
Example
1 Hamburger
|
|
|
|
|
hello friends,
i am new to the forum as well as development field.
can anybody help me out with using msscript.ocx for running scripts?i want to make a COM object utilising msscript.ocxwhich will be provided with the cript and language of it(javascript,vbscript) and it will run that.
pls help.
|
|
|
|
|
?????????? What kind of problem are you having? What you said amounts to "I want my component to run a script using msscript.ocx". Are you talking about adding scripting support to your application?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello all...
i have a database in Access 2000...i want to access single database from multiple location...how can i do in VB .net...i have tried accessing the database by Imports System.Data.OleDb...its giving error saying "The Jet microsoft database is already exclusively opened by another user...or you may not have rights to access it.."
if accessing the single database on server through multiple exe then giving above error....let me know if anybody has solution how to do it....
thanks in advance
|
|
|
|
|
An exclusive lock is only placed when somebody has it open on the desktop. Multiple OleDb connections are ok, just no combination of desktop user and OleDb user.
|
|
|
|
|
If someone has the database open in Access it will be locked exclusive. Also, make sure your application is running under an account that has Read and Write rights to the folder where your database resides. If you don't have Write access, then your database will appear locked.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello.
Can someone tell me if it is possible to build my own wizards and if yes how ??
Thank you.
Shavonne.
shevi2027@msn.com
|
|
|
|
|
Yep! you sure can.
The main idea is to make a form, with the buttons 'Back', 'Next' and 'Cancel'
then pacing a frame array on that: Frame1(n) that all have their Visible property set to False.
each frame is presenting the face of a wisard step.
(the frames must all be of the same size and must overlap each other completely.
then simply in the click events of next and back buttons, try showing the propper frame (makeing it's visible property True and the Visible property of the previous Frame to False)
now try designing each step on it's own Frame!
so simple yeah?
(VB Wisard Manager helps you do the same thing in VB6 but the idea is still the same.)
|
|
|
|
|
Thank you. I want to build a wizard like where you can select the database and then select the table(like access)...Is there any kinda activex control or software i can use for this ???
Thank you.
|
|
|
|
|
How can I deploy a Windows Service to Remote Computers on my network by selecting either the IP ot their Computer name.
|
|
|
|
|
Hi, Please forgive me for the simplicity of the question, and the redundancy. I have searched the forum and believe my answer is out there amongst the multiple dataset question/responses, but I am such a newbie that I am having trouble putting together the information I need...Ok, enough, here's what I am trying to do:
I am making a call to a third party API that returns a dataset. I need find out if there are any rows returned, and if so pull out the data from a couple of the columns...
More specifically, I get the dataset. Each row contains many columns, the three I need to get are BuySell, ControlValue, and Price.
Can someone toss out to me the simple code for traversing through the dataset and pulling out the values from these columns.
Many Thanks -
Jennifer
|
|
|
|
|
I am trying to add dynamic drop down menu in my office com addin
toolbar. I use control array for drop down menu, but
I can only get the event for the first one instead of each menu item
how can I fix this so that events can be generated in each menu item
Dim WithEvents cbeButton As Office.CommandBarButton
Dim cbcButton() As Office.CommandBarButton
private sub CreateMenu()
for i = 0 to 3
ReDim Preserve cbcCatalogButton(i)
cbcButton(i).caption = i
set cbeButton = cbcButton(0)
next i
end Sub
Private Sub cbeCatalogButton_Click(ByVal Ctrl As Office.CommandBarButton, _
CancelDefault As Boolean)
msgbox "hello"
end Sub
|
|
|
|
|
I have added a reference for sqldmo.dll to my project and i am succesfuly using the com interop to script my database objects. But, when i am deploying the project to another pc with win2000 i receive the following
error :
"COM object with CLSID {xxxx-yyyy-......} is either not valid or not registered"
What am i doing wrong?
thanks in advance.
G.
|
|
|
|
|
Hey
I need to trim 4 characters off the right hand side of my string and am having a little trouble doing so.
For example "Hello.doc" becomes "Hello"
I could use split at "." but this wont stay constant if there is a "." in the filename itself
Thanks for your time
chris
|
|
|
|
|
Hey, Chris. You could try:
dim s1 as string = "Hello.doc";
dim s2 as string = Left(s1, Len(s1) - 4)
Or, if you're dealing with file/path names and want to extract portions of it (say just the filename, or just the extension, that sort of thing) have a look at the System.IO.Path class.
|
|
|
|