473,385 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Database Connectivity using DSN

Hi,
I need to connect to SQL server Database using a System DSN. Can
anyone tell me how to connect to SQL Server using DSN in ASP.NET
(VB.Net). Using a Try Catch block.

Does anyone know how to create a "filename.DSN" file. I know how to
create a system DSN, but my N/W admin has asked me to create a DSN
file to send him. which would be a file name with ".DSN" extension, so
that he can place it on the server.

thanks in advance.
Nov 18 '05 #1
3 3445
Why on earth would you want to use a System or File DSN to connect to a SQL
Server?!

First, a System or File DSN uses ODBC (Open Database Connectivity), which is
a wrapper for OLE DB (Object Linking and Embedding for Databases). This
means that your database connectivity will be as slow as possible. You have
2 other choices. One is to use OLE DB, which eliminates the wrapper of ODBC.
The other is to use the native SQL .Net classes (System.Data.SqlClient).
This is the fastest way to connect to a SQL Server with .Net.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Niks" <ar*********@yahoo.com> wrote in message
news:c0**************************@posting.google.c om...
Hi,
I need to connect to SQL server Database using a System DSN. Can
anyone tell me how to connect to SQL Server using DSN in ASP.NET
(VB.Net). Using a Try Catch block.

Does anyone know how to create a "filename.DSN" file. I know how to
create a system DSN, but my N/W admin has asked me to create a DSN
file to send him. which would be a file name with ".DSN" extension, so
that he can place it on the server.

thanks in advance.

Nov 18 '05 #2
Hi,
Could you show a code sample of how to connect to an sql database using
the SQL .net Classes

Thanks
Kenneth

"Kevin Spencer" <ke***@takempis.com> wrote in message
news:Ok**************@TK2MSFTNGP10.phx.gbl...
Why on earth would you want to use a System or File DSN to connect to a SQL Server?!

First, a System or File DSN uses ODBC (Open Database Connectivity), which is a wrapper for OLE DB (Object Linking and Embedding for Databases). This
means that your database connectivity will be as slow as possible. You have 2 other choices. One is to use OLE DB, which eliminates the wrapper of ODBC. The other is to use the native SQL .Net classes (System.Data.SqlClient).
This is the fastest way to connect to a SQL Server with .Net.


Nov 18 '05 #3
Hi Kenneth,

Here's a link to a whole bunch of samples on the Microsoft MSDN Library:

http://msdn.microsoft.com/library/de...dataadonet.asp

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Kenneth Keeley" <ke*******@hotmail.com.nowhere> wrote in message
news:uS**************@TK2MSFTNGP11.phx.gbl...
Hi,
Could you show a code sample of how to connect to an sql database using
the SQL .net Classes

Thanks
Kenneth

"Kevin Spencer" <ke***@takempis.com> wrote in message
news:Ok**************@TK2MSFTNGP10.phx.gbl...
Why on earth would you want to use a System or File DSN to connect to a SQL
Server?!

First, a System or File DSN uses ODBC (Open Database Connectivity),

which is
a wrapper for OLE DB (Object Linking and Embedding for Databases). This
means that your database connectivity will be as slow as possible. You

have
2 other choices. One is to use OLE DB, which eliminates the wrapper of

ODBC.
The other is to use the native SQL .Net classes (System.Data.SqlClient).
This is the fastest way to connect to a SQL Server with .Net.


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: SectorUnknown | last post by:
I've written a database (Access mdb) front-end using Python/wxpython/and ADO. However, the scope of the project has changed and I need to access the same data on an MSSQL server. Also, the...
3
by: Alex | last post by:
I have developed a VB application that uses Oracle 8i database for backend. The database server is on the local network. From my development machine, the application connects (via ODBC) to the...
1
by: harish | last post by:
I am using java applications to connect to my MS SQL Server database. I am using ODBC for database connectivity. If i am running my java applications in a remote PC and try to connect to database...
3
by: junaid | last post by:
Hi to all, Can it is possible to connect to the databse like postgre or mysql through a C programm? I know the basics of C and I have developed a small program which uses a file for the...
8
by: David | last post by:
Hi, Could someone please xplain how to add a field to an existing SQL table in VB.Net I have added the field in the Server Explorer and it shows up when I reload the program but I cannot...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
47
by: Ivan Weiss | last post by:
Hi all, I am just getting started on a new app and am a rusty VB6 guy who is looking to create something on the side to serve as a corporate workbench for my company. ADO.net is new to me so...
0
by: dalaimanoj | last post by:
I have a form with buttons 'View', 'Save', 'Delete', 'Edit' and some textboxes to input data.. On clicking each buttons the database is connected and the respective action is done. For example...
4
by: ykhamitkar | last post by:
Hi there, I am trying to create a web based dataentry application in java applet. When I create a standalone application using applet the database connectivity works fine. However when I use same...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.