Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default SQL ODBC Connection

Does anyone know of a resource for learning to implement dynamic SQL Queries
with VBA? I have tried a few times to manipulate the SQL string but it seems
to be very sensitive and it is slow going figuring out what pieces I am
missing.

Basically I am looking to develop a method to allow the user to select from
a set of "And" statements then concatenate the SQL parts to result into the
finished CommandText string.

Any suggestions would be appreciated!

i.e.
'************
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=Database;UID=;PWD=;SERVER=data.com", _
Destination:=Range("A1"))
..CommandText = Array("")
..Name = "Query"
'************

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default SQL ODBC Connection

On Fri, 20 Feb 2009 08:33:00 -0800, Bythsx-Addagio
wrote:

Does anyone know of a resource for learning to implement dynamic SQL Queries
with VBA? I have tried a few times to manipulate the SQL string but it seems
to be very sensitive and it is slow going figuring out what pieces I am
missing.

Basically I am looking to develop a method to allow the user to select from
a set of "And" statements then concatenate the SQL parts to result into the
finished CommandText string.

Any suggestions would be appreciated!


BA: If you find something, let us know. In the meantime, just be very
careful. :)

Sometimes I'll open up Access and create the query in there, then look at
the SQL.
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com
Reply
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
SQL ODBC Connection rich19k83 Excel Programming 0 December 12th 08 11:27 AM
ODBC Connection Kezzemil Excel Programming 0 October 6th 06 09:15 AM
change and ODBC Connection [email protected] Excel Programming 1 August 14th 06 03:22 PM
ODBC Connection Adrian T[_4_] Excel Programming 4 January 25th 05 08:55 PM
ODBC connection by udl Dorothy[_4_] Excel Programming 1 January 8th 04 05:32 PM


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

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

About Us

"It's about Microsoft Excel"