Jump to content

SQL ERROR


Recommended Posts

if I search the database for this and its not there It chokes on the $oRS.Movefirst 35) : ==> The requested action with this object has failed.:

What do I put in so if it doesn't find it . It will just skip past the $Ors.movefirst and say msgbox(0,"No Record Found","")

???

$oRS.open("SELECT * FROM mp3list WHERE SONG = '" &$SONG& "'" & "AND ARTIST = '" & $ARTIST & "'", $oConn, 1, 3)

$oRS.RecordCount

$oRS.Movefirst

Link to comment
Share on other sites

Try something like

$oRS.open("SELECT * FROM mp3list WHERE SONG = '" &$SONG& "'" & "AND ARTIST = '" & $ARTIST & "'", $oConn, 1, 3)
    $oRS.RecordCount
        If $oRS = "" Then
             MsgBox(64,"Error","No record(s) found.")
        Else
         $oRS.Movefirst
        Endif

I don't know if it will work but it's worth a try.

Link to comment
Share on other sites

Try something like

$oRS.open("SELECT * FROM mp3list WHERE SONG = '" &$SONG& "'" & "AND ARTIST = '" & $ARTIST & "'", $oConn, 1, 3)
    $oRS.RecordCount
        If $oRS = "" Then
             MsgBox(64,"Error","No record(s) found.")
        Else
         $oRS.Movefirst
        Endif

I don't know if it will work but it's worth a try.

Nope still hangs.. ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...