A recordset cannot be null.
It can however be Nothing, and you can use similar code to this safely close it and tidy up:
If Not rs Is Nothing Then
If (rs.State And adStateOpen)...
Type: Posts; User: si_the_geek
A recordset cannot be null.
It can however be Nothing, and you can use similar code to this safely close it and tidy up:
If Not rs Is Nothing Then
If (rs.State And adStateOpen)...
If you have finished with the recordset, leaving it open is a problem.
If you don't close it, it will stay open (using up various resources) until something somewhere decides to makes it close...
Welcome to VBForums :wave:
There are two ways to make that kind of thing faster, the first is to use the CopyFromRecordset method that Excel provides (but you need all of the data in the recordset...
While storing data to a type could well be useful, that code is far larger than needed, and it uses the best-to-avoid GoTo without a valid reason and in ways that causes problems (eg: it sets...
There's no need for that kind of attitude, we were clearly just trying to help.
My post was not referring to running things in the database system itself (you had implied that you are capable of...
Thread moved to the 'Office Development/VBA' forum... note that while it certainly isn't made clear, the "VB Editor" in Office programs is actually VBA rather than VB, so the 'VB6' forum is not...
To check if it goes off the edge of the grid, work out what the end position is, and check it against the amount of rows/columns. For example, if the ship of length 5 starts at row 3 column 8, and...
Thread moved to the 'Office Development/VBA' forum... note that while it certainly isn't made clear, the "VB Editor" in Office programs is actually VBA rather than VB, so the 'VB6' forum is not...
For each ship, pick random values for row/column/direction.
If you don't know how to generate random numbers, see the tutorial about them in our Classic VB FAQs (in the FAQ forum)
Check that...
As this is not specific to VB.Net... Thread moved to the 'General Developer' forum.
There are a lots of extra features which make it worthwhile for many people, not to mention the fact that support (from Microsoft, and hardware/software manufacturers) is an issue for many people.
...
The question is not totally obvious, as there are important things we don't know... hence why you were asked for some clarification (even if the code isn't 'easy' for us, it would almost certainly...
Phill W is absolutely correct that you should be dealing with that (before thinking about other options/possibilities)... there is a guide to help you with this error in the article What does this...
Welcome to VBForums :wave:
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'VB6 and earlier' forum
VB6 does not have a...
As this question isn't related to databases... Thread moved from the 'Database Development' forum to the 'VB6' forum
Thread moved from the 'CodeBank VB.Net' forum to the 'CodeBank C#' forum
thanks for letting us know ident :thumb:
Welcome to VBForums :wave:
I'm almost certain that you cannot convert from VB (6 or otherwise) to Flash, you would need to completely re-write it in Flash instead.
There are people here who...
Thanks for letting us know, I'll try to get it fixed at some point today or tomorrow.
The only other desktop-compatible one is Windows 8 specific, so you the one you mentioned is correct for all other desktop versions of Windows (including XP).
Welcome to VBForums :wave:
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'VB6 and earlier' forum
You've got the loop wrong... as you will keep setting dirCollision.Left for each wall, so it will only store the last value.
Here is one way you could fix it:
If (KeyCode = vbKeyLeft)...
Is there a particular reason that you decided to use VB6 (aka VB 1998, which is no longer supported), rather than a newer version?
You can get the latest version (with its equivalent of the MSDN...
Welcome to VBForums :wave:
1. It is he right place if you want somebody to do all of the work for you (which is unlikely to happen), if you just want advice on fixing it yourself then one of our...
Thread moved from the 'CodeBank VB6' forum (which is for you to post working code examples, not questions) to the 'Office Development/VBA' forum... note that while it certainly isn't made clear, the...
It sounds like Indexing is probably the issue. As the second usage of a record is fast, it implies that the database system has cached a reference to it.
Indexes allow the database system to do...
The CodeBank is a group of forums we have, which contain example code for lots of things: http://www.vbforums.com/forumdisplay.php?36-VBForums-CodeBank
(there are sub-forums for "VB.Net" and...
The forum software removes duplicate spaces from text... the best way I know of is to use Code tags, I added them to your post above.
Rather than using a from clause associated with the Update,...
Perhaps this?
AND egs.CreateDate <= EGS1.CreateDate
Welcome to VBForums :wave:
Thread moved from the 'VB.Net' forum to the 'Office Development/VBA' forum.
No problem :)
As you now have it sorted out, could you please do us a little favour, and mark the thread as Resolved?
(this saves time reading for those of us who like to answer questions, and...
While that is slightly simpler than my version, it has some significant issues.
Those issues are based around the fact that & works with strings, which means that there need to be 3 data type...
It is hard to tell due to the lack of info/code you are sharing... but if I have made the right assumptions, this single line will do the same as that section of code:
firstnumber = (firstnumber *...
It is because you have explicitly tied the speed to Timer1.
Each time Timer1 fires, you start Timer2. When Timer2 fires, you do the work and disable Timer2 - and then have to wait until Timer1...
1) Yes, it is to cause an error if the value can't be converted to a string.
2) I agree with your analysis of it, so it is a rather strange function.
Based on various quality issues in the...
Welcome to VBForums :wave:
Read that line a bit more carefully... here is the SQL statement part with colouring to make it a bit clearer what is a string and what isn't:
"SELECT est_id FROM...
Welcome to VBForums :wave:
Thread moved from the 'VB6 and Earlier' forum to the 'VB.Net' (VB2002 and later) forum
Your previous thread on this subject was closed by a moderator, so creating another thread on the same subject is not acceptable (even if you claim something is different).
This thread is now...
Thread moved to the 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
Thread moved from the 'VB6 and Earlier' forum to the 'Reporting' forum
Welcome to VBForums :wave:
Thread moved from the 'Contests' forum to the 'VB.Net' (VB2002 and later) forum
For the benefit of others, Lukasz-Z's profile says VB 2010