The combobox has an AddItem method, you can do something like -
combobox1.AddItem "Jan"
- for each, or make an array containing the month names and loop through it for adding the array elements.
Hope this helps,
Dan.
Hi All,
I have a SQL2000 Server, running on windows 2000. About once every couple of weeks it will stop when you select 'view properties' through enterprise manager. I have tried accessing it with a Windows98 box and a Windows2000 box and have the same effect. As this causes the server to stop...
It is not quite as simple as that (things never are with MTS). There is not a limit on how many users you can have connected to MTS, but after a point you will notice that performance will start to degrade.
The point where performance drops off is also not a set point, but depends on what your...
It is happening becaust you program is still in an error state. You need to come out of the procedur to the calling procedure then go back in, perhaps using a parameter to control the version of the search that you pass in.
Hope this helps,
Dan
You might be better putting it on the KeyPress event. As far as I can remember not all keys (function keys etc) dont fire the keyDown and KeyUp events.
Dan.
Hi,
If you define your method in VB, something like ...
public sub mySub(byRef myArray() as integer)
... or whatever it should be, you can dimension your array in VFP and then pass the VFP array as an argument to the VB DLL, where you can manipulate it as usuall.
Hope this helps,
Dan.
Okay,
When you have built a DLL in VB and compiled it, you dont need to do call it in that way.
Instead do this...
1)Goto the project menu and select 'references'.
2)Find the DLL in the list and put a tick by it.
3)in your code use...
dim myObject as Test.Test
set myObject = new Test.Test...
Oh yeah, you will need to put the command RANDOMIZE in first, so ...
RANDOMIZE
MyValue = Int((RS.RecordCount * Rnd) + 1)
RS.Move MyValue,1 '1 means the start of the recordset
Dan.
First get your recordset, then generate a random number between 1 and the size of your record set, for example :
MyValue = Int((RS.RecordCount * Rnd) + 1)
RS.Move MyValue,1 '1 means the start of the recordset
You will now be pointing at a random record in your set, so display as normal...
Thinking about it, perhaps this code should be in combo1_change and not click. This would show the list, but it would fire if you type in the combo, so it depends what functionality you are after.
Dan.
what about the line :
sMyCriteria = DBCombo1.Text
this should still be the line direcly above the line :
sSQL = "SELECT * FROM EMPLOYEES WHERE [name]='" & sMyCriteria & "'"
so what you should have is :
Private Sub DBCombo1_Click(Area As Integer)
Dim sMyCriteria As...
The line :
sSQL = "SELECT * FROM EMPLOYEES WHERE [name]='" & sMyCriteria & "'"
needs to be before the line :
rs.Open sSQL, cn, adOpenDynamic, adLockOptimistic, adCmdText
Hope this helps,
Dan.
Hi,
If the above did not fix it then try changing the cursorLocation property to Client, and i think the cursor type will still need to be dynamic.
Dan.
I once had the same thing happen, in my case it was because I added descriptions to the project properties. When you add a description it is displayed in the references list instead of the name of the DLL.
I thought I was going mad for a bit ...
Dan.
I don't think it is just you, I agree. Once you have asked for a handle and been allocated one it makes no sense to hand it out again if the file has not been opened, but I guess we should be used to VB not nessecarily doing the sensible thing...
Dan.
I think you can do that, but you need to set the open them between doing freefile :
handle1 = freefile
open "xxx" for output as handle1
handle2 = freefile
open "yyy" for output as handle2
Dan.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.