LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default SQL string problem

Hello all!
I am using an ADO recordset to import data into Excel 2000 from a Win
2003/SQL Server2000 setup. My problem is the SQL string is getting
truncated and is not passed to SQL server 2000 in a complete form. Its cut
off. It appears to cutoff around 185 characters. Is this a setting that
can be reset? Is this an ADO Property that should be set to allow a bigger
SQL statement to be passed to SQL server. Its really weird that it only
takes so many characters, truncates the balance of the statement and then
still tacks the double quotes at the end of the statement? The

Here is the ADO recordset :
rs.Open strSQL, cnnStoredProc, adUseClient, adLockReadOnly

Here is the full SQL statement that is assigned to the strSQL variable that
is initially stored in the variable strSQL. This statement runs in the SQL
analyzer with no problems (variables x, and y with actual values).

SELECT [description],count(t2.Result) as total,t2.Result,t2.Vendor,
t1.[date]from Tblquestions t1 inner join TblResultsQuestion t2 on T1.[id] =
T2.QuestionID where T1.type = 4 and vendor like '" & x & "' and
[description] like '" & y & "' group by [description],Vendor, [date], result
order by [description],Result desc

Here is the actual statement that gets put into the strSQL variable when
passed via the above rs.open statement.

strSQL : "SELECT [description],count(t2.Result) as total,t2.Result,
t2.Vendor, t1.[date] from Tblquestions t1 inner join TblResultsQuestion t2
on T1.[id] = T2.QuestionID where t1.type = 4 and ve"




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with VB string character limit. AJL Excel Worksheet Functions 0 November 3rd 06 07:40 PM
to search for a string and affect data if it finds the string? Shwaman Excel Worksheet Functions 1 January 11th 06 12:56 AM
string sorting problem NikkoW Excel Programming 1 May 2nd 04 04:59 PM
Create a formula into a String then assign string to a cell Myrna Larson[_2_] Excel Programming 6 August 23rd 03 09:42 PM
Formatting Problem on Double-Zero String Tom Ogilvy Excel Programming 1 July 18th 03 06:56 PM


All times are GMT +1. The time now is 05:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"