?
Solved

Vb connecting to SQL?

Posted on 2003-03-25
3
Medium Priority
?
141 Views
Last Modified: 2013-11-23
Hello guys and gals. I was wondering if someone could helpe me. I am writing a VB program to connect to SQL database I am using the DSN name. but when I put the DSN name in the program It throws me an error saying OBDC not found or driver not specified. Not when I leave it blank it will prompt to select my data file source name. and it works. What I am I doing wrong? Am I missing something or should I have written this another way? Thank you very much
0
Comment
Question by:D_basham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
BurtonRacing earned 100 total points
ID: 8202868
Is the DSN name exact?  I would try to use a DSN-Less connection, but you could do a search on www.google.com for "Connection Strings" which will give you a bunch of sites that show how to connect to different types of databases in different manners.  If that doesn't help post your code.  It would be nice to see how you have the DSN setup, but not a big deal.
0
 

Author Comment

by:D_basham
ID: 8203018
Yeah it is the exact DSN name I thought of that too. I will try the search and if I don't see anything I will post the code. Thank you very much.
0
 

Expert Comment

by:archekrypt
ID: 8216284
you haven't got a valid DRIVER as a provider, check your ADO References.

OR

the database isn't there, or it is there but NOT VALID!!!!!!!

So, yeah!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question