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: 26
Default Type Mismatch when running query on SQL Database

Hi,

I'm trying to run a query from Excel against an SQL Database. I get a Type
Mismatch error when it is executing the following line of code.

Sheets(SQLDestinationSheet).Range(SQLDestinationCe ll).QueryTable.CommandText
= Array(FullSQL)

Now this works fine for the rest of the program except for my last query and
I suspect it is because the SQL statement that I store in the variable
FullSQL is greater than 255 characters long.

Anybody come across this and know a way around it?

Ta.

 
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
Database Query -- Data Type Mismatch StephenP Excel Discussion (Misc queries) 0 April 14th 05 07:05 PM
Help - Type mismatch when running loop with strings from arrays Marie J-son[_5_] Excel Programming 3 March 19th 05 08:36 PM
Type Mismatch Error when running a SELECT SQL Andy Dorph Excel Programming 1 February 9th 05 06:12 PM
ODBC SQL Query give type mismatch in where clause nmci_dmar Excel Programming 1 February 19th 04 07:31 AM
Type mismatch while running If statement Stel Excel Programming 4 December 18th 03 09:19 AM


All times are GMT +1. The time now is 05:16 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"