Public Function getkaraoke(ByRef oCnn As ADODB.Connection, ByVal songnum As Long, ByVal singer As String, ByVal song As String, ByVal Path As String) As ADODB.Recordset
fenster - what control are you using? Someone here would probably be able to tell you. I don't have access to VB so I'm not of much help in that area.
Martin - I'm assuming he is using OE since he's getting an error regarding a variable not being dimensioned. If he wasn't using OE the app would compile but not function.
Option Explicit is a command given to VB to not let you use any variables that have not been declared. This stops variable name typos when you're coding.
There is no way this coding ever worked the way it is written.
First of all, Function getkaraoke asks for a list of parameters but they're never used. So you could change the protocall for Function getkaraoke from
VB Code:
Public Function getkaraoke(ByRef oCnn As ADODB.Connection, ByVal songnum As Long, ByVal singer As String, ByVal song As String, ByVal Path As String) As ADODB.Recordset
to
VB Code:
Public Function getkaraoke As ADODB.Recordset
THEN, since getkaraoke does not accept any parameters, you can change the way you call it from
VB Code:
Set gorsgetkaraoke = goEnv.getkaraoke(goEnv.Cnn, CLng(songnum), Trim(singer), Trim(song), Trim(Path))
So you got your coding working without making any changes? That's different. I wouldn't mind looking at the project as a whole if it's not an issue. Just to see where I slipped up.
these files i alredy used for another project - there may be some dead code lying in them - the karaoke thing was a util to use once only - so it may be a bit messy ...