Solved

VB5 ODBC SQL Server

Posted on 1997-07-31
2
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

739 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