.NETGURU
Problem inserting large text object using OleDbCommand
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oledb' list.


Karell Ste-Marie
-- Moved from [aspngdata] to [ngfx-oledb] by Alex Lowe <Click here to reveal e-mail address> --

I folks,

I seem to have uncovered a strange problem inserting a large text object into an ntext column in SQL2000.

It would seem that the OleDbcommand object is limited to 900 characters of data, would someone have a workaround?

I am using the varwchar database type and giving it an explicit limit of
more than one million characters size-wise. One thing to note, not only are no errors reported but the data is inserted as blank. Not null, not truncated, but blank.

TIA

Karell

Reply to this message...
 
    
James Avery
Is there a reason why you would use OleDbCommand for SQL2000 instead of
SqlCommand?

-----Original Message-----
From: Karell Ste-Marie [mailto:Click here to reveal e-mail address]
Sent: Thursday, July 25, 2002 8:36 AM
To: ngfx-oledb
Subject: [ngfx-oledb] Problem inserting large text object using
OleDbCommand

-- Moved from [aspngdata] to [ngfx-oledb] by Alex Lowe
<Click here to reveal e-mail address> --

I folks,

I seem to have uncovered a strange problem inserting a large text object
into an ntext column in SQL2000.

It would seem that the OleDbcommand object is limited to 900 characters
of data, would someone have a workaround?

I am using the varwchar database type and giving it an explicit limit of
more than one million characters size-wise. One thing to note, not only
are no errors reported but the data is inserted as blank. Not null, not
truncated, but blank.

TIA

Karell
| [ngfx-oledb] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp = JOIN/QUIT

Reply to this message...
 
    
Alex Lowe
Yes, I wanted to write code once and be able to use it on SQL Server and
Oracle (or some other database). Simple performance vs. reuse issue. =)

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Translate C# code to VB.NET code at
http://aspalliance.com/aldotnet/examples/translate.aspx
***********************************************************

[Original message clipped]

Reply to this message...
 
    
James Avery
Fair enough. :)

What type of connection string are you using? I ran into a similar
problem when I was not specifying an oledb provider in the string.

-----Original Message-----
From: Alex Lowe [mailto:Click here to reveal e-mail address]
Sent: Thursday, July 25, 2002 1:52 PM
To: ngfx-oledb
Subject: [ngfx-oledb] RE: Problem inserting large text object using
OleDbCommand

Yes, I wanted to write code once and be able to use it on SQL Server and
Oracle (or some other database). Simple performance vs. reuse issue. =)

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Translate C# code to VB.NET code at
http://aspalliance.com/aldotnet/examples/translate.aspx
***********************************************************

[Original message clipped]

| [ngfx-oledb] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp = JOIN/QUIT

Reply to this message...
 
    
Karell Ste-Marie
Alex, James,

I use an OleDbCommand because I don't plan on using anything else than
SQL2000. I require the functionality of the Full Text indexing system
for the operation of our software. (We use a lot of XML)
I also prefer the speed over the portability, this system is designed
for more than 1000 users (possibly concurrent).

The Connection string is:

<BORG_ENCRYPTION>
Provider=3DSQLOLEDB.1;Integrated Security=3DSSPI;Persist Security
Info=3DFalse;Initial Catalog=3DBORG_dotNet;Data Source=3DBORGSERVER;Use
Procedure for Prepare=3D1;Auto Translate=3DTrue;Packet =
Size=3D4096;Workstation
ID=3DWKSMTL_CIO;Use Encryption for Data=3DFalse;Tag with column =
collation
when possible=3DFalse
</BORG_ENCRYPTION>

I was quite surprised at the limitation, when we designed the system for
the IOC we were also using XML, however I will have to assume that none
of the XML documents were bigger than 900 characters. (Or something else
is affecting this problem, the IOC system is on another server).

________________________
Karell Ste-Marie
C.I.O. BrainBank Inc

-----Original Message-----
From: James Avery [mailto:Click here to reveal e-mail address]=20
Sent: Thursday, July 25, 2002 1:58 PM
To: ngfx-oledb
Subject: [ngfx-oledb] RE: Problem inserting large text object using
OleDbCommand

Fair enough. :)

What type of connection string are you using? I ran into a similar
problem when I was not specifying an oledb provider in the string. =20

-----Original Message-----
From: Alex Lowe [mailto:Click here to reveal e-mail address]=20
Sent: Thursday, July 25, 2002 1:52 PM
To: ngfx-oledb
Subject: [ngfx-oledb] RE: Problem inserting large text object using
OleDbCommand

Yes, I wanted to write code once and be able to use it on SQL Server and
Oracle (or some other database). Simple performance vs. reuse issue. =
=3D)

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Translate C# code to VB.NET code at
http://aspalliance.com/aldotnet/examples/translate.aspx
***********************************************************

[Original message clipped]

| [ngfx-oledb] member Click here to reveal e-mail address =3D YOUR ID=20
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp =3D JOIN/QUIT

| [ngfx-oledb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp =3D JOIN/QUIT

Reply to this message...
 
 
System.Data.OleDb.OleDbCommand
System.Data.SqlClient.SqlCommand




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification