Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DSN errors; DSN-Less doesn't

Posted on 2000-03-31
3
Medium Priority
?
404 Views
Last Modified: 2008-03-03
I'm dealing with a problem that occurs when I return a field (typeof nText) via the DSN (in VB6) but is solved when I use a connection string that includes: Provider=SQLOLEDB

Runtime error '-214217887 (80040e21)':

The field in question holds HTML content - small to moderate sized pages. When I use Query Analyzer to see how it returns data it runs without errors but truncates the field in question...the output stream simply stops.

As I said....I've found the right combination of ConnectString parameters but I'd like to better understand how it is that a DSN connection is not working. For some reason I'm thinking it should be _more stable/verbose. Also, the wizard that creates the DSN starts off by asking which provider to use. (version 3.70.06.90 on win98 client, iis4/nt host)

thankx
--steve...
0
Comment
Question by:juststeve
[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
3 Comments
 
LVL 7

Accepted Solution

by:
simonsabin earned 200 total points
ID: 2673389
The DSN connection is probably using the MSDASQL provider using the SQL SERVER driver part. To use the SQLOLEDB provider you need to use a UDL.
If you go to explorer and right click a folder, and select the new option. One of the things you can create is a Microsoft Data Link (a UDL).

I believe no I had a similar problem with older versions of MDAC (2.0 I think).
0
 

Author Comment

by:juststeve
ID: 2673717
Thankx simon...let me drill on this just a bit deeper. As regards what I'm seeing happen from Query Analyzer...the truncating of the long text block...is that an error condition? (even though none's reported?)

Unless I'm mistaken, EM & QA use OBDC instead of OLE DB - does that account for the difference in what's returned?

thankx again.
0
 
LVL 7

Expert Comment

by:simonsabin
ID: 2679220
The truncation is an environment variable called TEXTSIZE which limits the size of text fields in ISQLW

try the following
reate table test1 (col1 text)
go
insert into test1 values ('123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890123456789012456789012345678901234567890')
go
set textsize 100
select * from test1
set textsize 500
select * from test1
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

618 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