Solved

VB5 ODBC SQL Server

Posted on 1997-07-31
2
194 Views
Last Modified: 2012-08-13
Wrote a Stored Procedure in SQL Server 6.5. Run from iSQL/Enterprise Manager - no problem. Call the same SP from VB5. Get funny results. Traced it to reading a specific  field in a table. Why this difference?
0
Comment
Question by:JHS
2 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 100 total points
ID: 1429096
Sounds like a data type format discrepancy.  Ever notice that you don't see tables anymore in any of the help systems?  Here's one I've been trying to assemble locally:
                               Access Methods
                    MS Sql      MS Access  Oracle  VB/RDO  VB/DAO
Data Type
 
Anyway, I've noticed that there are some holes and ambiguous mappings.  Make sure your access method knows how to interpret the column data type that's giving you a problem.  The Enterprise manager doesn't have any column problems, it's a native user.  But when you use VB, it has to interpret the column types into its own terms, and could be mapping types incorrectly.
0
 

Author Comment

by:JHS
ID: 1429097
Thanks.

I think I should add some more information. The SP I call does not return any data, it does some calculations and then writes data to a table. So VB does not have to interpret any return values. The SP calculates a certain value, then reads the troublesome table with certain values to obtain another values, does some more calculations and write the answer to a table on the database. The select statemant has an where clause containing 3 checks (that is - 2 'AND') The problem lies with one of these that it can not find true, BUT only if it is excecuted from VB, not from the Enterprise manager.

This sounds like a SQL Server problem, but why only if executed from VB.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

821 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