Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, Guys :) I try not to visit here too often (you have
enough work to do), but I'm stumped. I am currently building a turnkey 2002 Excel application that needs to pull, each time the workbook file is loaded, a small number (600) of records out of a potentially large (200,000+) c: drive database (which is populated locally via VBA from a website Excel spreadsheet export). A variety of customized reports, charts, and data crunching will result from each file load, so I'm all right with working with Excel for this. The database is going out to a large number (3000+) of strangers all over the country, most of whom aren't particularly familiar with Excel. I wish there was an easier way to do this, but I'm locked in (the Access Application isn't available to the users in question). VB isn't an option, either, due to time restraints and the software development requirements for the company I work for. In general, this is a very customized (but robust) project and this one item is the only real thing keeping me from getting it done. I am pointing in the direction of a DAO Late-Bind connection (to sidestep the necessity of teaching 3000 people how to set up a Reference). First, is DAO Late-Bind the correct choice, or is there an easier way to do this? I managed to build the database and workspace connections with an early bind, but as soon as I change everything to generic Objects to do a Late-Bind, it chokes on the CreateDatabase string (to initialize an empty project if the database doesn't already exist). Would anyone happen to have an example of a working DAO Late-Bind? DIM statements, a DB creation string, a Workspace creation string, and a CreateDatabase string is all I need, really. I'm pretty sure I can take it from there. I spent all night on the Internet, and then looked through every single reference book I could get my hands on (and I have a lot of 'em). If necessary, I'll bring in a copy of my DB-related code from work, but I'm writing this post from home and don't have it with me. Thanks for all your help. -D |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you using any constants in your createdatabase expression. (such as
Set nWindEx = Workspaces(0).CreateDatabase(Application.Path _ & "\NWINDEX.MDB", dbLangGeneral) ' dbLangGeneral would be "" rather than its early bound defined value of ";LANGID=0x0409;CP=1252;COUNTRY=0" (at least that is its value on my machine). or perhaps you use the createworkspace method that also uses a constant when you late bind, these constants are empty variables - they are not defined constants anymore. The will be interpreted as having value of zero (for longs, or null string for strings). this is a common problem people overlook when using latebinding - this would be particularly true in your case where you used early binding to do the development and are switching to late binding. You need to hard code values where you have constants. (or define the constants in your own code). Just a thought. -- Regards, Tom Ogilvy Sharqua wrote in message ... Hi, Guys :) I try not to visit here too often (you have enough work to do), but I'm stumped. I am currently building a turnkey 2002 Excel application that needs to pull, each time the workbook file is loaded, a small number (600) of records out of a potentially large (200,000+) c: drive database (which is populated locally via VBA from a website Excel spreadsheet export). A variety of customized reports, charts, and data crunching will result from each file load, so I'm all right with working with Excel for this. The database is going out to a large number (3000+) of strangers all over the country, most of whom aren't particularly familiar with Excel. I wish there was an easier way to do this, but I'm locked in (the Access Application isn't available to the users in question). VB isn't an option, either, due to time restraints and the software development requirements for the company I work for. In general, this is a very customized (but robust) project and this one item is the only real thing keeping me from getting it done. I am pointing in the direction of a DAO Late-Bind connection (to sidestep the necessity of teaching 3000 people how to set up a Reference). First, is DAO Late-Bind the correct choice, or is there an easier way to do this? I managed to build the database and workspace connections with an early bind, but as soon as I change everything to generic Objects to do a Late-Bind, it chokes on the CreateDatabase string (to initialize an empty project if the database doesn't already exist). Would anyone happen to have an example of a working DAO Late-Bind? DIM statements, a DB creation string, a Workspace creation string, and a CreateDatabase string is all I need, really. I'm pretty sure I can take it from there. I spent all night on the Internet, and then looked through every single reference book I could get my hands on (and I have a lot of 'em). If necessary, I'll bring in a copy of my DB-related code from work, but I'm writing this post from home and don't have it with me. Thanks for all your help. -D |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bingo. That's exactly what's happening.
I'll take a look at it on Monday when I go back in. Thanks, Tom. I knew you'd have an answer if nobody else did. :) -Donna -----Original Message----- Are you using any constants in your createdatabase expression. (such as Set nWindEx = Workspaces(0).CreateDatabase (Application.Path _ & "\NWINDEX.MDB", dbLangGeneral) ' dbLangGeneral would be "" rather than its early bound defined value of ";LANGID=0x0409;CP=1252;COUNTRY=0" (at least that is its value on my machine). or perhaps you use the createworkspace method that also uses a constant when you late bind, these constants are empty variables - they are not defined constants anymore. The will be interpreted as having value of zero (for longs, or null string for strings). this is a common problem people overlook when using latebinding - this would be particularly true in your case where you used early binding to do the development and are switching to late binding. You need to hard code values where you have constants. (or define the constants in your own code). Just a thought. -- Regards, Tom Ogilvy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Late Binding issue with Excel.Application object | Excel Discussion (Misc queries) | |||
VB Extensibility library and "late binding" | Excel Discussion (Misc queries) | |||
Creating a MailItem in Outlook from Excel using Late Binding | Excel Programming | |||
Early vs Late Binding - Word | Excel Programming | |||
DAO objects with late binding in Excel? | Excel Programming |