Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
External Links Connections
Raymond Spornhauer 
          
8 months ago
I've worked with ODBC connections to external databases, but am curious what other connections are being used and any pro's or con's to these with Access.

Has anyone used Oracle connections?

Thanks for any input,

-Raymond
Kevin Yip  @Reply  
     
8 months ago
In Visual Studio and VB.NET, I use SqlClient, specially made for connecting to SQL Server in .NET.  It is supposed to have better performance due to the lack of any intermediate layers like ODBC or OLE DB.  Sample code below.  It uses connection string, connection object, etc., similar to how ADO does it.
Kevin Yip  @Reply  
     
8 months ago

Raymond Spornhauer OP  @Reply  
          
8 months ago
Kevin

Does this setup a read/write connection?  ... or is this read only?  What are the limitations using this method?

Also; I have no experience using .NET.  I have installed Visual Studio on my computer, but I really don't understand how to use it.  Are there any good resources for learning to use .NET?

I have watched the VB.NET lessons from this site, but it didn't explain anything.  I think there was an assumption that people just know how to use it.

Thanks,

-Raymond
Kevin Yip  @Reply  
     
8 months ago
Raymond  The code I showed is indeed for read-only operations.  To read and write, you need to use another object called DataTable.

The VB.NET lessons on this site try to copy the the old lessons of VB6, which were done the same way.  Richard made those many years ago, and VB6 was much simpler than VB.Net.

If you are well-versed in Access, it should not be too much trouble learning VB.NET on your own (at least mostly on your own), which was what I did.  There is still going to be a learning curve, but having a good knowledge of Access gives you a good foundation and fortitude to deal with that difficulty.

One way to learn is make a simple app with VB.NET.  The screenshot below is a calculator app I made.   Visual Studio has an excellent code editor that gives you lots of help.  It flags way more errors than Access does, tells you how to fix errors (often with sample code), marks locations of errors on the scrollbar, etc.

VB.NET shares much of the same syntax as VBA, but also differs a lot with VBA.  In VB.NET, you can declare a variable and assign a value at the same time:   Dim i As Integer = 100

VB.NET can increment a variable with "increment operators": +=, -=, &=, etc.:
x += 1 is the same as x = x + 1
s &= "ABC" is the same as s = s & "ABC"

VB.NET uses the "?" sign to stand for nullible variables.  For instance:

     rs?.Close()

is the same as:

     If Not rs Is Nothing Then rs.Close


But the most useful thing about VB.NET is that it can write web apps too.  Below is web app version of the calculator, and it uses basically the same VB code.  If you need to convert a desktop app to web app, VB.NET gives you an big advantage.  Richard recently wrote about the failure of Access web apps ( https://599cd.com/blog/display-comment.asp?CommentID=114307 ), mainly because VBA isn't "portable" to other platforms.  But VB.NET lets you reuse code from one platform in another, thus saving you time in development.

Kevin Yip  @Reply  
     
8 months ago

Kevin Yip  @Reply  
     
8 months ago

Kevin Yip  @Reply  
     
8 months ago
Another crucial difference shown above is that I don't have to use ten different OnClick event procedures for the ten buttons on the calculator.  One procedure does it all.
Raymond Spornhauer OP  @Reply  
          
8 months ago
Kevin

Thanks for the responses.  I will be working on learning VB.NET

Any additional learning resources would be greatly appreciated.  

-Raymond

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/20/2026 7:52:09 PM. PLT: 0s