Getting ORA Oracle error code using ODP.net? - vb.net

i use below DLL to connect direct to oracle from client.
oci.dll, Oracle.DataAccess.dll, oraociicus11.dll, OraOps11w.dll, orannzsbb11.dll, oraocci11.dll, ociw32.dll
connection string:
Dim oradb As String = "Data Source=(DESCRIPTION=(ADDRESS_LIST=" _
+ "(ADDRESS=(PROTOCOL=TCP)(HOST=172.20.128.33)(PORT=1521)))" _
+ "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bipcdb)));" _
+ "User Id=msavameri;Password=123456;"
but when I run application the following error occurs:
ORA-28547: connection to server failed, probable Oracle Net admin error

Here is a list of files needed by Oracle.DataAccess:
oci.dll
Oracle.DataAccess.dll
orannzsbb11.dll
oraociei11.dll
OraOps11w.dll
Be sure that all of these files are present in the client directory. It looks like the list you gave may be missing oraociei11.dll.

Related

Microsoft Access Database Engine causing fatal communications error with Windows Process Activation

I'm using the Access Database Engine Redistributable to read an Access database in my .net application and for some reason whenever I use a join to query data from the access database to fill a datatable it causes a fatal communications error with the Windows Process Activation Service. I can populate datatables without issue as long as there is only one table. As soon as I add just one join, I get the system error. There are no errors in my application to trap, the system error occurs and then the application stops processing. This is only happening on one server. My local computer doesn't seem to have this issue. I'm using the exact same redistributable on my local computer and the server. Two things boggle my thinking why does a join cause an issue and why does it cause a system error and doesn't push it up to the app? If I'm using a single table query, it works fine.
Steps to populate datatable:
accessConnection = New
System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source='" &
uploadedFileName & " '; Persist Security Info=False;")
accessDataAdapter = New System.Data.OleDb.OleDbDataAdapter("select * from Table1 INNER JOIN
Table2 ON Table1.PK = Table2.PK", accessConnection)
accessDtSet = New System.Data.DataSet
accessDataAdapter.Fill(accessDtSet) - Application fails here
accessView = accessDtSet.Tables("Locations").DefaultView
This is just a guess but maybe try the following provider in your connection string:
Provider=Microsoft.Jet.OLEDB.4.0

Debug and Cannot Open Connection to SQL

When debugging in SQL, I get the following exception :-
System.Data.SqlClient.SqlException: 'A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)'
When I then set next statement and run the statement again, it works. It also works when I'm running the application standalone as a compiled application. Anyone know why this causes an error only when in debug.
The connection is to a remote database sited off-site, not to the local database.
Data Source=xx.xx.xx.xx;Initial Catalog=TheDatabase;User ID=MasterUser;Password=AsIfIMGoingToPostThat
Your help, appreciated.
This is my function to connect...
Public Sub New(ByVal strConnect As String)
Try
dbConnect = New System.Data.SqlClient.SqlConnection(strConnect)
dbConnect.Open()
objParams = New List(Of SqlClient.SqlParameter)
m_bIsConnected = True
Catch exc As Exception
m_bIsConnected = False
Finally
End Try
It looks like your local connection doesn't default to named pipes but your compiled version will try (or is allowed to use TCP/IP). The error shows that it may be expecting named pipes.
Try putting this "np:" in the Data Source in your connection string:
Data Source=np:xx.xx.xx.xx; ...
To get it to connect first time, it looks like I need to add "Network Library=DBMSSOCN;" to connect in debug. t.b.h., Have no idea why...

Oracle 9i ignores query alias sent from vb.net

The following code is from a released version of an application using framework version 1 and Oracle 9i.
strSQL = "SELECT COURSE_CODE AS CODE FROM COURSE_REVISIONS WHERE DOC_REF_CODE = '" & doc_ref_prevcode & "'"
objDataset = stkDataAssistant.getTable(strSQL)
course_code = objDataset.Tables(0).Rows(0)("Course_Code").ToString
Response.Redirect("../Courses/CourseRevisionNew.aspx?flag=add&course_code=" & course_code)
It is throwing an error on the following line:
course_code = objDataset.Tables(0).Rows(0)("Course_Code").ToString
It is known that there is an error in the sql string with the alias CODE. This issue was being ignored in the clients environment and was working until a month ago that is now throwing an error in the stated line above.
Is this error showing up now because of some sort of framework change? Or is it with Oracle?
The client states that there has been updates to the server where the database resides but the application was still working as expected. The error started showing up 3 months later and there has no changes done to either the database or application environment.
Oracle 9i has been out of support for many, many years. However you have to work with what you have, try this:
SELECT "COURSE_REVISIONS"."COURSE_CODE"
FROM "COURSE_REVISIONS"
WHERE "COURSE_REVISIONS"."DOC_REF_CODE" = 'QDMSPROD';
Or you could make a view with the alias that you want and select from that.

Firebird Error: "operating system directive CreateFile failed"

Did any one see this error ??
I'm using Firebird 2.1 and database create statement is getting failed on v.first stored procedure execution.
Error Message:
[869] : There was a problem creating a DBProvider with the following parameters: StoredProcedureName:sel_NextObjectID
2. operating system directive CreateFile failed
3. operating system directive CreateFile failed
Stack Trace
2.at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
at FirebirdSql.Data.FirebirdClient.FbConnectionPool.Create()
at FirebirdSql.Data.FirebirdClient.FbConnectionPool.CheckOut()
at FirebirdSql.Data.FirebirdClient.FbConnection.Open()
at FirebirdDBProvider.NewProvider_Internal(String commandText, String connectionString, CommandType commandType)
3 at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
at FirebirdSql.Data.FirebirdClient.FbConnectionPool.Create()
at FirebirdSql.Data.FirebirdClient.FbConnectionPool.CheckOut()
at FirebirdSql.Data.FirebirdClient.FbConnection.Open()
at FirebirdDBProvider.NewProvider_Internal(String commandText, String connectionString, CommandType commandType)
You can get this error when you are attempting to connect to a database which does not yet exist.
It is not entirely clear from your post what you mean with 'database create statement is getting failed on v.first stored procedure execution', but I assume you are attempting to create a database and then execute DDL.
To connect to a database, you first need to create it. To create a database you need to use createDatabase first.
Well, deleting all temp file fixed this thing. Found the same issue on firebird too.
1) Make sure your application (on which you're facing this issue) is not running.
2) One Run dialog (Window + R) and type in “%temp%” and click “ok”
3) In the opened folder delete all the files (which can be deleted).
4) Start the application.
Just had same issue, the reason was no free space available on the system drive.

RunTime Error 380 - Specified Fieldname not found in object

I am running a VB6 application with a Pervasive V9.5 Database. I am receiving a RunTime Error 380 - Specified Fieldname not found in object when only 2 of my users are trying to log in. Rest of the office is fine...Does anyone have any idea what the issue could be? I have searched for a few hours now and can't find anything helpful.
The login uses a VAccess control during the login. Could this be caused by a missing DLL or OCX file on the client machine?
Any suggestions would be appreciated as I am out of ideas.
Edit:
With vaLogon
.RefreshLocations = True
.DdfPath = DataPath
.TableName = "USERLOG"
.Location = "USERLOG.MKD"
.Open
If .Status <> 0 Then
ErrMsg = "Error Opening File " + .TableName + " - Status " + str$(.Status) + vbCrLf + "Contact IT Department"
End If
End With
I have enabled VADebug mode and on the workstation in question, when the app is launched I receive the DDF error:
The VAccess control was unable to open FIELD.DDF at the specified DDFpath. This may result from an error in the DDFPath or refreshlocations properties, or from a corrupt FIELD.DDF.
Then an error message:
ACBtr732 - Btrieve status = 170, Brtrieve Opertation Code = 0, VAccessName = vaLogon, VALocation =
Then my login prompts for username and password and once the Login button is clicked is when the user receives the 380 Runtime.
The error 170 means "Database login required. Authentication to the database failed due to a wrong or missing username." Are you sure the Datapath variable has the proper path in it?
Can you connect to the database through the Pervasive Control Center? Does it require a user/password?
A corrupt DDF on the server would typically affect all users.