Solved

VB5 ODBC SQL Server

Posted on 1997-07-31
2
188 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

744 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

9 Experts available now in Live!

Get 1:1 Help Now