Solved

ODBC--call failed Error in SQL Record Set

Posted on 2004-03-24
7
574 Views
Last Modified: 2007-12-19

Hi Guys!

How do I get rid of this "ODBC--call failed." error:
                        Dim BioWebServerConnector
                        Dim BioWebMatch
                        Dim MatchResponse
                        Dim ID
                        
                        Set BioWebServerConnector = CreateObject("BioWeb2Server.Connector")
                        Set BioWebMatch = BioWebServerConnector.Match
                        
                        Set rs = Server.CreateObject("ADODB.Recordset")
                        rs.Open "Biometric_Transactions", cn, adOpenKeyset, adLockPessimistic, adCmdTable
                        rs.AddNew
                        rs("UserID") = Request.Form("User_Logon")
                        rs("VerifyFeature") = BioWebMatch.Decode(Request.Form("VerifyFeature"))
                        rs("SupportedDevice") = Request.Form("SupportedDevice")
                        rs("RemoteAddress") = Request.ServerVariables("REMOTE_ADDR")
                        rs("Approved") = 0
                        rs.Update
                        ID = rs("ID")
                        rs.Close
                        Set rs = Nothing
                        
                        If (ID = NULL) OR (Len(ID) = 0) Then
                              Dim ConnectionString, MySql
                              Dim Conn
                              ConnectionString = "DSN=BioWeb;UID=sa;PWD=Not4U2C;"
                              Set Conn = Server.CreateObject("ADODB.Connection")
                              Conn.Open ConnectionString
                              MySql = "SELECT MAX(ID) AS ID FROM Biometric_Transactions"
                              rs = Conn.Execute(MySql)
                              ID = rs("ID")
                              Conn.Close
                              Set Conn = Nothing
                        End If
                        
                        'My boss was always getting a "BioWeb2Server (0x800A005E) Invalid use of Null" error here
                        'I am now getting an "Error Type: DAO.Field (0x800A0C4A) ODBC--call failed." error here
                        MatchResponse = BioWebMatch.Result(CLng(ID))

How do I get rid of this "ODBC--call failed." error? Both the server and the client are running on the same laptop, with the IUSR account set up with access to the database.

Thanx

Dave
0
Comment
Question by:dbabbitt
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 6

Expert Comment

by:sforcier
ID: 10671482
Verify that the value stored in ID is not null by doing this:

If IsNull(ID) Then
   Response.Write "It's NULL!"
   MatchResponse = ""
Else
   MatchResponse = BioWebMatch.Result(CLng(ID))
End If

If the message "It's NULL!" is displayed, you need look at the code above to determine why (post here for help on that as well).
0
 
LVL 31

Expert Comment

by:alorentz
ID: 10671643
You'd think at least you would've used the code we wrote in the last Question to clean up you code!!!  Why don't you start with that....and then see what happens.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 10671656
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:dbabbitt
ID: 10673648
I can run Microsoft Script Debugger on the server - Here's what's in the Command Window:

? ID
184

? CLng(ID)
184

? BioWebMatch.Result(CLng(ID))
ODBC--call failed.
0
 
LVL 6

Accepted Solution

by:
sforcier earned 500 total points
ID: 10674208
I did a search for the BioWeb components you're using (to try and find a fix). If I'm looking at the right info, then you're trying to get a fingerprint based security system running. I don't mean this to sound glib, but can't you just contact their technical support? I'd assume that a fingerprint security system is expensive stuff, and I can't imagine paying a lot of money and not getting any support.
0
 
LVL 28

Expert Comment

by:sybe
ID: 10675020
>>  "Error Type: DAO.Field (0x800A0C4A) ODBC--call failed."

I hope you are not using DAO, because that is vastly outdated
0
 

Author Comment

by:dbabbitt
ID: 10702919
In the ODBC control panel, I discovered it was not able to log in using the sa account.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now