PC Review


Reply
Thread Tools Rate Thread

Chartspace Data Source and Connection String Problem

 
 
headly
Guest
Posts: n/a
 
      23rd Jan 2008
I've embedded the activex chart control on a form. It needs to pull data from
an access database. When hardcoded into properties, the chart works fine, but
I'd like to dynamically be able to pull the data from whatever directory the
file may reside in.
Here's the code that isn't working, thoughts appreciated

'Create variable for connection string less path

Dim strConnection As String
'The access db has the same name as the workbook
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Left(ActiveWorkbook.FullName, Len(ActiveWorkbook.FullName) - 4) &
".mdb;Persist Security Info=False;Jet OLEDBatabase Password=;"

frmMain.ChartSpace1.ConnectionString = strConnection
frmMain.ChartSpace1.DataMember = "qryDJIA"
frmMain.ChartSpace1.Refresh
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Managing multiple data source connection string parameter in Web.config nospam Microsoft ASP .NET 0 5th Oct 2007 02:52 AM
Can I change a connection string of the object data source programmatically ? Orit Microsoft ASP .NET 2 20th Jun 2007 03:20 AM
ODBC Data Source Connection Problem =?Utf-8?B?TGluY29sbiBC?= Microsoft Access VBA Modules 0 7th Jun 2007 05:08 PM
How to use a Connection String in an Access Data Source shapper Microsoft ASP .NET 0 27th Sep 2006 11:32 PM
Can UNC path be used as Data Source argument in OLE DB connection string? GY2 Microsoft ADO .NET 7 23rd Feb 2006 04:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:06 AM.