Category Archive for "ASP.Net"

How to connect different database in ASP.Net

How to connect database in ADO Database Connection Create a DSN-less Database Connection The easiest way to connect to a database is to use a DSN-less connection. A DSN-less connection can be used against any Microsoft Access database on your web site. If you have a database called “northwind.mdb” located in a web directory like “c:/inetpub/wwwroot”, you can connect to the database with the following ASP code: <%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/inetpub/wwwroot/northwind.mdb"%> Note, from the example above, that you have to…

Read More