Archive

Posts Tagged ‘Connections’

Database Connections in ASP

September 24th, 2009 Mehmatrix No comments


1.1) MSSQL ( Microsoft SQL Server ) Connection in ASP


Sturcture 1.1:

1
2
3
4
< %
Set ConnectionName=Server.CreateObject("Adodb.Connection")
ConnectionName.Open "driver={SQL Server};server=MyHost;uid=MyLogin;pwd=MyPassword;database=MyDatabaseName"
%>

You can determine the server, uid, pwd and database variables as you need.

Example 1.1:

1
2
3
4
< %
Set MyConn=Server.CreateObject("Adodb.Connection")
MyConn.Open "driver={SQL Server};server=127.0.0.1;uid=memisologin;pwd=memiso;database=memisodb"
%>

1.2) MDB ( Microsoft Access Database ) Connection in ASP

Click to Read Complete Article »

Bookmark and Share

Database Connections in Java

September 24th, 2009 Mehmatrix No comments

Before giving structures, we need to notice a little detail about making database connections in Java. All database connections must be stated in try and catch statements, because there is a possibility of getting an exception. That’s way, we try to make our connection in try statement. If our connection attempt fails, that means there is an exception, and the exceptions must be catched.

1.1) MS SQL Connection in Java

Example 1.1: MakingConnections.java Click to Read Complete Article »

Bookmark and Share
eXTReMe Tracker