Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 18th, 2005, 12:32 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Mikeopolo
Default SQL statement limited to 255 chars

Hi:

I'm writing a function to query a database, using ADODB recordset method. The SQL statement is being truncated at 255 characters.

From reading,I found a VB Guide put out by MS that says you can parse the statement in to smaller chunks, and pass them through as an array, as long as the first element in the array is the connection string.

Has anyone got any examples of this method they could share?

Regards
Mike
 
Old February 18th, 2005, 09:20 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you using VBA in Excel or VB6 or similar?

If VBA in excel, it the truncation occuring in the .Connection = "" string or in the .CommandText =Array("") string

try this syntax for size...

.CommandText = Array(" text "," Text2 "," text3 "," Text4 ")
I always leave a space at the beginning and end of each array element.

Cheers

Matthew









Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the statement to select limited values? Mangore SQL Language 1 December 1st, 2008 02:42 AM
Display ASCII chars (128 to 255) in a TextBox JerrySykes Beginning VB 6 8 August 6th, 2007 10:47 AM
255 character limit in datagrid boundfield poogles ASP.NET 2.0 Basics 0 July 16th, 2007 04:18 PM
convert a SQL Statement from MS Access to a SQL Corey Access 6 March 28th, 2007 12:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.