Oracle Connection Using TNS Name?

Mar 27, 2012

I have put my tns connection into the .ora file and am now able to conenct to it using SQL plus and can ping it :tnsping myConn.I've also added the connection to the ODBC Manager and connecting successfully when tetsing conneciton through the ODBC tool.now i'm having an issue making a connection to it using vb.net..[code]

View 3 Replies


ADVERTISEMENT

Asp.net - Intermittent .net Oracle Connection?

Aug 22, 2011

I am seeing a strange intermittent connection failure. My application works just fine and then starts throwing connection failure exceptions. A reset of IIS is required before the app will start working again.I've been able to trace a few of the failures back to an unexpected restart of the oracle cluster but not all of them. Has anyone else seen this problem? I've searched the web but haven't found anything.

Client - Win2003 server, IIS running ASP.net 2.0.50727, code is VB.NET, ODBC connection via Oracle Client 10.2.0.1.0 Server - Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production on a Linux cluster.

[Code]...

View 4 Replies

Connection String To Oracle 10g DB?

Jan 26, 2011

i am trying to connect to it via VB.net 2010. I have been trying the following:

Dim myConnection As OleDbConnection
Dim myCommand As OleDbCommand
Dim dr As OleDbDataReader

[Code]....

And i get the error on the Catch ee As Exception line: ORA-12560: TNS:protocol adapter error

I also have a tnsnames.ora file on my computer but i am unsure if i need to use that when connecting (or really, how too in the first place)? Is it needed for the code above?

I am trying to use a DNS-Less connection to the DB. Not sure if that is what it is doing in this or not?

View 2 Replies

VS 2008 Oracle DB Connection

Sep 8, 2010

Anyone know where I might be able to find code examples for connecting to an existing Oracle DB? I need to connect to my company's oracle db so I can write strings to it, verify strings, and read from it. I've found bits and pieces of code here and there, but nothing for all of it. I am a novice programmer and I am trying to add a db connection to an existing project for our plant to access the data. Our IT dept. is helping me with the db end.

View 2 Replies

What's The Replacement For Oracle.Connection

Apr 27, 2011

I have a vb.net program that is failing, but giving no errors. I've just discovered that the code I am using is deprecated. But what is the replacment? (That seems like something useful for MSDN to list, but I'm sure not seeing it.)

Private Sub SetConnectionToDB(ByRef oCMD As OracleCommand)
Dim connectionString As String
connectionString = My.Settings.ImportDataConnectionString

[code]....

View 1 Replies

Close Oracle Connection In Program?

Aug 13, 2011

In my program I got multiple spots where I open a Connection to an Oracle database, read some lines via a stored procedure which returns me a cursor, put them in an IDataReader, close the connection and go on.

Now everything works fine till the point of closing the connection. I've watched the connections opened to the database via TOAD for Oracle and I figured out, that the database seems to keep an connection opened after I said m_Connection.Close and m_Connection.Dispose.

I use Oracle.DataAccess and get an error after a short time, that there are to many connections. I debuged my session and made sure, that vb performs the close() command and it does it, but the database not.

View 1 Replies

Creating Connection To Our Oracle Database?

Jan 19, 2011

I've been viewing the tutorial at [URL]...08-088541.html but I'm still having issues creating my connection to our Oracle database. Here's my code, which uses the same connection string as one of my VB6 programs (no password required for database--Oracle picks up windows name) :

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Create connection object
Dim OraDB As String = "Data Source=databaseneme;Persist Security Info=False"
Dim conn As New OracleConnection(OraDB)
conn.ConnectionString = OraDB
conn.Open()
Me.Show()
End Sub

I've been using .NET for all of 10 mins so the error may be painfully obvious!

View 18 Replies

Oracle ODBC Connection Monitoring?

Apr 8, 2011

I'm trying to develop a simple app with vb.net in VS 2010 that could monitor the ODBC connections via DSN made on the macnhine running this app.My scenario is an application (non Vb) running on a workstation that connects to an MS Access database on a network share.

The application (non Vb) connects using a link (ODBC connection via Oracle 10G) to the tables on the Oracle side.My VB.net Application should monitor the machine running the main application for ODBC connections drops and alert me via email for example.My question is where in the framework can I find something to instantiate or reference in order to check ODBC connections states constantly as well as network disconnection issues as well so I can log and /or alert when possible for network problems and ODBC connection problems for all the applications that might run on the host (machine running my vb app).

View 3 Replies

Using Parameters With An Oracle ODBC Connection?

May 1, 2009

I'm connecting succesfully to an Oracle 10g DB with an the Microsoft ODBC for Oracle driver.Regular queries without parameters work fine, but parameterized queries act as if the parameters aren't getting passed in.ex.

--this works fine

Select * from tbl1 where column1 = 'test'

--this doesn't

select * from tbl1 where column1 = ?
--odbc string parameter 'test'

Here's what my connection string looks like:

"Driver={Microsoft ODBC for Oracle}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _

[code]....

View 3 Replies

Dynamic Connection With Oracle From Application In Windows CE 5

Nov 21, 2009

I'm starting using a project for smart device in windows CE 5. I'm using visual basic of v. studio 2008.I need to create a dynamic connection between a PDA (codebar lector) and an server with ORACLE 9i. The PDA connected via WIFI. But in my vb project I don't find OLEDB or ODBC elements.

View 2 Replies

Open An Oracle Database Connection In .net 2008?

May 18, 2009

I am trying to open an Oracle database connection in vb.net 2008 in order to issue a Select statement and the populate a listbox with it.

My code is as follows:

Dim orclstr As String = _
"Provider=OraOLEDB.Oracle;" & _
"Data Source=10.0.0.77;" & _
"User ID=myuser;" & _

[code]....

Obviously, I am doing something wrong, but I can't figure out what.

View 1 Replies

Choose Connection Programmatically From Oracle / Sqlserver / Mysql

Mar 16, 2012

I am developing a program to manage inventory and accounts. different clients need different databases like oracle/sqlserver/mysql etc. i want to make my solution work with all these database servers by only changing one string value . i want to declare like :

[Code]...

View 2 Replies

Asp.net - .NET Framework Data Provider For Oracle Multiple Open Connection

Jan 17, 2012

I have the below mentioned code in a seperate class file for establishing connection and carry out DB transactions. I have an issue where multiple connections being opened which sometime exceed the connection pool. When I stepped through the code I found that there are codes which call ConnectDB() in a loop without calling DisconnectDB(). But I expected that the condition OraConn.State = ConnectionState.Closed should handle the situation. Somehow the condition is always satisfied hence openning another set of connection. Can you suggest where am I going wrong and also what best practice can be adopted here?

[Code]...

The connection is again opened in function updData(). While I understand that it has to be closed correctly but keeping tab on every developer is not possible. Hence I want to control it directly from the connection class by using the same connection but the condition If OraConn.State = ConnectionState.

UPDATE I have put the code in UpdateDB under a Using block and removed call to ConnectDB and DisconnectDB from function like InsertData(...). It seems that the issue has been resolved. But I would like to know in case of exception will the connection remain open? and also OraConn is a public variable defined outside Using block so will it be disposed of by the GC?

[Code]...

View 1 Replies

Bulk Insert From Datatable In To Oracle Using Oracle.DataAccess

Mar 4, 2010

I am reading a csv file in to a datatable in vb.net and making a few checks and appending an extra column. I then want to perform a bulk insert using microsofts Oracle.DataAccess (no choice in this) to an Oracle database. what would be the best way to perform this as there is no bulkImport like in SQLserver.

View 2 Replies

Visual Basic With Oracle Provider Oledb For Oracle?

Dec 29, 2009

can you tell me,how can i add a provider for oracle(Microsoft Provider oledb for oracle).Actually i had Microsoft ODBC for oracle but i want to add a provider above mention.

View 2 Replies

Connect To Oracle Without Oracle Client On Client's PC

Jul 2, 2010

i Use "Imports System.Data.OracleClient .. Private conn As New OracleConnection()" to connect to my Oracle database..but when i put my program to another PC I need install Oracle Client on it...is there some other way how to connect to Oracle DB without installing oracle client to client PC?? (Database is on Server an program is on client´s PCs)

View 2 Replies

Assign A My.Settings.Item Connection String To Cmd.Connection Connection String Value?

Aug 25, 2009

How do I assign a My.Settings.Item connection string to cmd.Connection connection string value?

Dim cmd As New SqlCommand()
cmd.Connection = My.Settings.Item("csStaffHoursWorked")
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "spSaveDeltekImport"

View 3 Replies

Display Connection Properties Dialog For Connection String Browsing(for Database) In Run Time?

Feb 5, 2010

Is there a way to display the connection properties dialog for connection string browsing(for database) in run time?

As I want the user to be able to connect to various database using the GUI.

View 6 Replies

Error - ExecuteScalar Requires An Open And Available Connection - The Connection's Current State Is Closed

Aug 3, 2011

i have an application. which is executed after every 5 mins. i have an open connection but it gives me the following error:

ExecuteScalar requires an open and available Connection. The connection's current state is closed.

my code is something like this. I have shown where all i am using ExceuteScalar()

Sub Main()
Try
connection.open()
cmd.ExecuteScalar()

[code]....

View 2 Replies

Sql Server - .net Program Dataadapter Connection Closes After Fill But Database Still Shows Connection?

Aug 19, 2010

After running the following sub (VS debugger), I try to detach the database in SSMS, but it shows the connection open still and won't let me detach. If I close program in debugger, the database shows no connections. I check the dataadapter's connection in the finally block and is shows closed. What gives

Private Function ClientMasterDBFiles(ByVal MasterClientDBConnection As String, ByVal DBName As String) As DataTable

[Code]...

View 1 Replies

[2008] Error - Unable To Read Data From The Transport Connection: The Connection Was Closed

Mar 15, 2009

I have a simple scraper. It works on some websites, but on some there is this Error:

Quote:

IOException was unhandled Unable to read data from the transport connection: The connection was closed

It is occuring at "Dim htmlresults As String = Urlcontents.ReadToEnd()".

'Create the HttpWebRequest object
Dim req As HttpWebRequest = WebRequest.Create(URL)
'Set the timeout to 1 second (or 1,000 milliseconds)
req.Timeout = 10000

[code]....

View 2 Replies

Disable The Local Area Connection While Leaving The Wireless Connection Enabled

Jun 21, 2010

I am attempting to write a program that will disable the Local Area Connection while leaving the Wireless connection enabled. My company is using net-books in our stores to demo air-cards and we need to keep them off of the LAN. I'm new to VB and VB.net, and it's been a while since I did any type of programming. I've gathered some code that others have posted in forums and tutorials and I'm working through a tutorial book, but I finally believe that I am stuck.

[Code]...

View 4 Replies

ExecuteNonQuery Requires An Open And Available Connection, The Connection Current Stat Is Close?

Nov 30, 2008

i make a class and when i call on form then that error occurs "ExecuteNonQuery requires an open and available connection, the connection Current stat is close "

Class Code isImports System.Data.SqlClientImports System.DataImports System.StringPublic Class DatabaseKits Dim Cn As New SqlClient.SqlConnection Public Function BuildConnection() As Boolean Try Cn.ConnectionString = "Persist Security Info=False;Integrated Security=True;Trusted_Connection=Yes;database=BizAimsPro2008;server=Server-2k3s" BuildConnection =

[code]....

View 3 Replies

Networkstream Connection Fails & Httpwebrequest Connection Not Reading Fast

May 17, 2012

I am connecting to a data stream that pushes data continuously and when I tried to set up a network stream I just could not connect and kept getting the 'not found' error. I used the httpwebrequest with webrequest.keepalive = true and started to consume the data by reading into a buffer and then appending to a stringbuilder. Once the stringbuilder reaches max size I flush it to a text file. The problem is that I get disconnected from the data stream because I am not reading the data fast enough. I need to keep the connection open and read the data while ensuring data gets stored in text files. If I use method "CONNECT" it does not connect to the stream.

While (True)
webrequest = DirectCast(Net.WebRequest.Create(url), HttpWebRequest)
webrequest.Credentials = New System.Net.NetworkCredential(username, password)
webrequest.Method = "GET"

[code]....

should I increase the buffer size and if so what is the max? that would mean I can read more data at a time and keep up with incoming push. Disparate here.

ACtually also I noticed that it gets stuck on this line

numbytesread = responseStream.Read(bufferread, 0, BUFFER_SIZE)

and then eventually I get disconnected.

View 1 Replies

Networkstream Connection Fails & Httpwebrequest Connection Not Reading Fast Enough

May 17, 2012

I am connecting to a data stream that pushes data continuously and when I tried to set up a network stream I just could not connect and kept getting the 'not found' error. I used the httpwebrequest with webrequest.keepalive = true and started to consume the data by reading into a buffer and then appending to a stringbuilder. Once the stringbuilder reaches max size I flush it to a text file. The problem is that I get disconnected from the data stream because I am not reading the data fast enough. I need to keep the connection open and read the data while ensuring data gets stored in text files.If I use method "CONNECT" it does not connect to the stream.[code]

View 1 Replies

Winforms - .net Connection Entity Framework Connection String Security?

Sep 3, 2011

I understand the possibilities for encrypting a connection string in .net v4. I have a win forms application that will be used by multiple people on different machines. I understand that I need to protect the connection string at time of the app being first run on the target machine. However I am concerned that for a period of time my connection string will be unencrypted. I am looking for advice in how to deploy my app with the connection string already encrypted or encrypted during installation. encrypting the connection string in a secure way?

View 1 Replies

.net - Connection Was Not Closed Connection's Current State Is Open?

Dec 19, 2011

Try If functionmode = "ADD" Then

[Code]...

View 1 Replies

Connection Was Not Closed Connection's Current State Is Open?

Jul 5, 2011

I got this error..The connection was not closed. The connection's current state is open.

This is coding to add data in Ms access in vb...

Imports System.Data.OleDb Public Class Form1

[Code]...

View 5 Replies

Establish A Connection When The App Is Launched And Keep The Connection Open Until The App Is Closed?

May 20, 2010

I'm developing a device app in VB.net that will access a SQL Server database. I need to establish a connection when the app is launched, and keep the connection open until the app is closed. I've done the following:In the Master Module:

Public CNN
As SqlConnection

In the Main menu form load:

CNN =
New SqlConnection(sqlConnString)
CNN.Open()

Then when I want to read from the database:

Dim sqlDR
As SqlDataReader
SQL = "SELECT Name FROM Table"

[code]....

When I run the same code without the global CNN, but rather dim the connection inside the Select function, all works well.

View 6 Replies

Invalid Connection String When Modifying Tableadapter Connection?

Jan 19, 2011

I'm developing an app in vb.net (visual studio 2008). I have a Teradata back-end that will be supporting multiple users in a production environment. I need to use variables in the connection string as the user/pass will be changed every 3 months.

For the gist of the application:

In it's most basic form - I have a search form which works correctly - it pulls results into a listbox and the user then double clicks the list box which will then open a form that is bound via table adapter to the back-end table (Teradata). My connection string is fine everywhere in the application. My problem is using a modified connection string for the "fill" function of the table adapter once the form is opened.

I'm using the code below for the on-load event and keep getting an "invalid connection string" - again, the connection string works fine everywhere else in the app, and the variables etc... are working correctly.

Private Sub adaptertest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DBConnStr As String = "Provider=TDOLEDB;Data Source=TDDEV;Persist Security

[Code].....

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved