UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Making A Dll... Or Should I?    
 
   
nuclear_nick
post Jul 6 2019, 03:01 PM
Post#1



Posts: 1,873
Joined: 5-February 06
From: Ohio, USA


Background... saw Visual Studio was available for my work computer (through IT app). Didn't install, kept hanging. A few years later, company switches to O365, and I end up with a new computer, and IT puts VS on it.

So finally, I can play/learn VS.

I thought, as a first project to learn with, I'd take a VBA module and convert it into a DLL, see if it would run faster that way. The module hasn't changed and has been running fine since 2003, so I thought it would be a good candidate. It's simply a date "converter"... for example, give it a year and it will return the first date in the fiscal year. Give it a date, and it will return the fiscal year the date occurs in... there are a few other "conversions", but I'm certain you get the point.

So... my question is... should I? Would it really make it faster? I know I would learn something, but is it the right thing to learn? What are the pitfalls of creating a DLL like this, besides registration and distribution to the users of the database(s)?

Looking for good feedback...

--------------------
"Nuclear" Nick
____________
The top three reasons to hide code; 1) It's not your own. 2) It's your own, but it's so crappy you don't want anyone to see it. 3) The comments in your code would get you in a lot of trouble if ever made public.
Go to the top of the page
 
 
Start new topic
Replies
Doug Steele
post Jul 6 2019, 07:50 PM
Post#2


UtterAccess VIP
Posts: 22,305
Joined: 8-January 07
From: St. Catharines, ON (Canada)


While it would doubtlessly be a great learning experience, I doubt there would be any noticeable improvement in performance, and potential issues associated with ensuring version compatibility if the DLL changes would seem to outweigh any possible advantages. YMMV.

What you described is easily accomplished using simply VBA. No need to add the complexity of an additional external component.

--------------------
Doug Steele, Microsoft Access MVP (2000-2018)
Personal webpage
Microsoft profile
Co-author: Access Solutions: Tips, Tricks, and Secrets from Microsoft Access MVPs, published by Wiley
Co-author: Effective SQL: 61 Specific Ways to Write Better SQL, published by Addison-Wesley Professional
Technical Editor: Access 2010 Bible, Access 2013 Bible, Access 2016 Bible, all published by Wiley
Technical Editor: SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, 4th Edition, published by Addison-Wesley Professional
Go to the top of the page
 
GroverParkGeorge
post Jul 7 2019, 07:28 AM
Post#3


UA Admin
Posts: 37,510
Joined: 20-June 02
From: Newcastle, WA


I would urge you to engage in this project as a LEARNING experience if you want to try out one of the programming languages supported in Visual Studio. That way you can also see how the two compare (native VBA vs VB or C# or whatever you decide to learn.) Like Doug says, I don't think the results would be what anything like what you seem to expect. On the other hand, learning something new is always a valuable and exciting experience in itself. Keeping your expectations at a realistic level is a pretty good idea too, though.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
nuclear_nick
post Jul 7 2019, 01:25 PM
Post#4



Posts: 1,873
Joined: 5-February 06
From: Ohio, USA


I will just use it to learn, then... keep it out of production.

I was thinking/hoping that it would improve query processing time when I use the VBA functions in a query. I'll test.

Is there another way besides a DLL? Just curious.

Oh, and I do thank you Doug and George, for the quick feedback. Awesome!

--------------------
"Nuclear" Nick
____________
The top three reasons to hide code; 1) It's not your own. 2) It's your own, but it's so crappy you don't want anyone to see it. 3) The comments in your code would get you in a lot of trouble if ever made public.
Go to the top of the page
 
GroverParkGeorge
post Jul 7 2019, 04:14 PM
Post#5


UA Admin
Posts: 37,510
Joined: 20-June 02
From: Newcastle, WA


Do let us know your test results.

Good luck with the rest of your project.

--------------------
My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 

Posts in this topic



Custom Search


RSSSearch   Top   Lo-Fi    12th July 2020 - 05:36 PM