.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 27th, 2010, 07:17 AM
bhv bhv is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 55 bhv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 25 m 19 sec
Reputation Power: 12
Oracle Connection

hello experts,
i am developing my first project in ASP.Net with database in Oracle. to connect with db, i have made connection file.

FILE: conenction.ora


Public Class ConnectionOra

Dim ConnString As String = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOC OL=TCP)(HOST=IP)(PORT=POrt)))(CONNECT_DATA=(SERVER =DEDICATED)(SERVICE_NAME=XE)));uid=databasename;pw d=password;"
Dim strConn As String = "Data Source=(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(HOST = IP)(PORT = port))(CONNECT_DATA = (SID = sid)));User Id=uid;Password=password;"
Dim conn As New OracleConnection(strConn)

Function connectionOracle()

If conn.State = Data.ConnectionState.Closed Then
conn.Open()
End If

Return conn

End Function

Function connectionCloseOracle()

conn.Close()
conn.Dispose()

Return conn
End Function




End Class


i call the above function in each page where i have to display data from db.

Dim cn As New ConnectionOra

Dim cmd As New OracleCommand
cmd.Connection = cn.connectionOracle

cmd = "select query"
..........
cmd.dispose()

now the problem is, the conenction is called/opened every time the page loads. and the whole server hang. and it stop all other applications also. so this is the BIG issue.

please help me. it's a serious problem.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > Oracle Connection


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap