Solved

Requested conversion is not supported - Error on only one computer, code runs fine on 20 others

Posted on 2008-10-06
17
464 Views
Last Modified: 2012-05-05
The application is custom build inhouse,
I am getting error 2147217891 (Requested conversion is not supported)
This only happens on one computer and the code hasent changed since before when it was working. The code works fine on 20+ other computers so I think it must be related to a dependancy on the computer.

Steps taken so far
I have tried uninstalled / reinstalled the software several times, including deleteing the install directory
I have manually replaced all of the files that the installer places in the system32 directory to ensure the version are the same as other computers.
I have reinstalled .Net framework 2.0

Any suggestions as to what is causing this error, which files or settings to check etc would be greatly appreciated.
0
Comment
Question by:celco
  • 9
  • 7
17 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22653674
unless you can isolate the code where it happens, it will be impossible to give any clear "solution".
it could be a NULL or other data type issue...
0
 

Author Comment

by:celco
ID: 22653764
Sorry I forgot to mention about that.
I checked the database where and the number in it is valid (type bigint)
I changed some other data in the database so that the code in question wouldn't be run and then I recieve the same error a little bit later on another line of code reading from a different table in the database, this is what makes be believe that its not data or code related but rather caused by a dll or something on the box in question. Again the code also runs fine on 20 other computers.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22653856
again, without seeing the line of code where it fails (including the "watch window of all the variables in that context), it's impossible to solve the problem.
0
 

Author Comment

by:celco
ID: 22653893
Fails on this line
int_DevelopmentQuoteKey = Val(RS_TMP.Fields("Dev_QuoteOfTheDayIndex").Value)
database field is type bigint with a value of 3


Local variables
Me      {CBM.FRM_MainMenu}      CBM.FRM_MainMenu
bool_DevelopmentDatabase      False      Boolean
bool_NewDevelopmentKeyRequired      False      Boolean
eventArgs      {System.EventArgs}      System.EventArgs
eventSender      {CBM.FRM_MainMenu}      Object
int_DevelopmentQuoteKey      0      Integer
int_NextDevelopmentQuoteKey      0      Short
MyIniFile      {CBM.IniFile}      CBM.IniFile
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22654093
ok, just out of curiousity:
>database field is type bigint with a value of 3
>int_DevelopmentQuoteKey      0      Integer

those data types don't match, why that?

anyhow: why do you use VAL() function, you have 2 numerical data types?
0
 

Author Comment

by:celco
ID: 22654260
The Val() was not there originally, I added it when trying to troubleshoot this issue.

Your right about the types not matching, vb.net int is 32 bit while bigint is 64, I changed the vb.net variable to a long (64bit) and the problem still exists.

Let me reiternate this is not a code issue, has been working fine on this machine and over 20 others for months. The issue just started recently, the problem is either triggered by some other software install or a windows update. I have removed everything that he thinks was installed in the last week.  If I stop this line of code from executing the error simply happens to another line of code later on.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22654350
how exactly are you running the query?
0
 

Author Comment

by:celco
ID: 22654496
The query is
Select Dev_QuoteOfTheDayIndex, Dev_QuoteOfTheDayDateRefreshed from TBL_SEC_Security WHERE UserName = JohnSmith

The variables used
      Public CN1 As New ADODB.Connection
      Public RS_TMP As New ADODB.Recordset
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 22654521
well, not yet the full code, but already clarifying that you use the adodb instead of ado.net...
any reason you stick with the old adodb instead of using ado.net?

anyhow, so far you should check which version of ado is installed on the computer it does not work on:
 support.microsoft.com/kb/301202
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 22656248
>>Let me reiternate this is not a code issue, has been working fine on this machine and over 20 others for months.<<
Of course it is a code issue.  The fact that you do not have adequate error handling that logs the exact values in order to identify the problem does not absolve the code in any way shape or form.  Until you are prepared to log the values, the exact line it is caused and any other pertinent data, it will be like swatting flies in a dump.

As a first step at least add Try/Catch/Finally code and log any errors.
0
 

Author Comment

by:celco
ID: 22659212
angelll - thanks for the suggestion, the computer with the issue is out of the office today so I will try checking the mdac tommorow. I was thinking it was MDAC related but when I downloaded 2.8 and tried to run the install at the end of the day yesterday I got a message saying that MDAC could not be installed because it is not supported by the OS (XP sp2) and that all the features are part of the OS

The reason we are using adodb instead of ado.net is this application was origianlly built in VB6 and has recently been converted to vb.net, ado.net is on the radar to change to, its just a mater of time to get it done.
0
 

Author Comment

by:celco
ID: 22668978
Angelll
I compared the MDAC file version to the version on my computer (which is working). Both are running 2.8 SP1 on Windows XP SP2 and all the files versions are the same on both computers.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22668991
then, I am out of ideas... at least without having "more input" .... :(
0
 

Author Comment

by:celco
ID: 22678609
Ok so I replaced the old vb6 style on error with the try catch error handler and I got the following
Message = Requested conversion is not supported
Stack trace = at adodb.field.get_value() at .... (the function the code is in)
TargetSite = system.object get_value()

Besides redeclaring the connections and recordsets what else might be involved in upgrading to ado.net?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22678694
using try-catch is vb.net error handling, but not using ado.net ...
anyhow, I am a bit out of ideas, on this one :(
0
 

Author Comment

by:celco
ID: 22680323
Yeah I am aware try / catch is just error handling, I was looking at doing the switch to ado.net to hopfully side step this error.
Anways thanks for you help
0
 

Author Closing Comment

by:celco
ID: 31503574
Sorry I forgot to close this a while ago. The issue was MDAC, I found a site explaining how to repair and it fixed the problem. Thanks for your help
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

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

12 Experts available now in Live!

Get 1:1 Help Now