This is a migrated thread and some comments may be shown as answers.

VS 2008 SP1 & Oracle

15 Answers 161 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Francesco
Top achievements
Rank 1
Francesco asked on 28 Oct 2013, 08:12 AM

I have a problem using the controls in visual studio 2008 (sp1) with oracle 11, while in vs 2010 and 2012 everything works fine.

When I try to add the model, if I select Oracle database, add new connection, in the data provider list I can find only

the .net framework data provider for Oracle and NOT the Oracle Data Provider for .Net. Selecting it, adding the connection parameters, I have the following error:

OCIEnvCreate failed with return code -1 but error message text was not available.

In addition, if i open an existing project using the controls, i can open the rlinq model but if i try to update it from database the message is 'unable to retrieve the database schema information. Reason: ORA-22062'

In Vs 2010 it works and I can also select the Oracle data Provider from the list of available provider.
Any idea?

15 Answers, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 28 Oct 2013, 01:48 PM
Hello Francesco,

Can you please ensure that the ODT tools are also installed for your Visual Studio 2008? You can verify this by checking the Menu -> Help -> About Microsoft Visual Studio. There you should find an entry like this 'Oracle Developer Tools for Visual Studio Copyright (c) 2005, 2013'.
Additionally a small research brought me to this link, where other users had the same problems because of permission settings. Can you check them accordingly?

Hope this helps.
Feel free to ask in case you have any other question.

Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 30 Oct 2013, 02:06 PM
Hello Ralph, thank you for your quick reply.
Permission settings seem to be all right.
Actually i can't find ODT entry in visual studio 2008 (while in vs 2010 is present); according to what's stated in Odac pages, support for vs 2008 is provided since version 11.1.0.6.21, newer versions (i installed v. 11.2.0.3.0) should supported visual studio 2008 too, isn't it? Should i install even older versions?...

0
Ralph Waldenmaier
Telerik team
answered on 30 Oct 2013, 03:06 PM
Hello Francesco,
That there is no entry in Visual Studio means that the tools are not installed for this version. According to this link, Visual Studio 2008 is supported. Though this information belongs to the latest version of the driver. Can you try to install the latest version and see if it then works in your VS 2008. Unfortunately, I can not tell you if the version that you are using had already support for 2008. Am I right when I assume that you have no express edition of VS 2008 installed?

Do come back in case you have any other question.

Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 31 Oct 2013, 08:38 AM
Hello Ralph, i installed a newer version of ODT with visual studio 2008 support. now i can see the ODT entry in visual studio 2008 but the problem remains. When i set the connection for the model, a pop up without any message appears... If i try to update an existing model the error message is still the same:  'unable to retrieve the database schema information. Reason: ORA-22062'.
In Visual studio 2010 everithing is fine... any other idea?
Thank you for you help
Francesco
0
Ralph Waldenmaier
Telerik team
answered on 04 Nov 2013, 01:02 PM
Hi Francesco,
This is indeed strange. Can you please try the following:
1. Create a new project in VS 2008
2. Add a new OpenAccess Model to it.
    While specifying the database can you verify that the test connection button is working? See the attached screenshot for details.

If this is the case can you please also ensure for this test that your visual studio is running with English language settings. Is it working then?

Do you get any other error messages reported that would also help to identify the cause of this?
Hope this helps.

Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 05 Nov 2013, 11:24 AM
Hello Ralph,
I think the problem is due to data sources names not resolved. If i try to add the model in a new project, no connection appears in the combo box; if i try to add it manually (add new connection) the 'test connection' button closes the window without any message, if i click the ok button an empty dialog appears.
If i add an empty model and then i try to update it from database, in the setup database connection window if i try to add a new connection it returns an error: no data sources are available (which is different from the behaviour if i try to populate a model from database...)
So the next question is: is there a place where i can select the tnsnames.ora to use? (i've different versions of oracle client installed and this could be a problem). In your example, probably using vs2012, you can select the tntnames.ora to use, i'm not able to find something similar in vs2008. Thank you for you help.
Francesco
0
Ralph Waldenmaier
Telerik team
answered on 05 Nov 2013, 02:29 PM
Hello Francesco,
Having no tns information indicates that your client has not the appropriate tnsnames.ora file.
Can you ensure that the client you are using with VS2008 has an tnsnames.ora file. Usually it is located under the Network/Admin folder of the respective client. Here is an example path 'D:\app\waldenmaier\product\12.1.0\client_1\Network\Admin\tnsnames.ora' .

Are you now able to create a successful connection to your database?

Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 05 Nov 2013, 03:15 PM
Hello Ralph, the tnsnames.ora is present in the right location (in VisualStudio2010 and with other clients everything works fine), i can estabilish connections via code (in VisualStudio2008) using the odac library but i can't add oracle connections using the server explorer/add connection wizard  in VisualStudio2008 (which is the same displayed when i try to add a connection for the telerik model); so probably if i add a connection via code, VisualStudio looks for the tnsnames.ora file in the right place, if i try to estabilish a connection through the wizard it fails because it looks for the file in some other place... and the problem is that i can't find something like "tnsnames.ora file currently in use" of your example...
0
Ralph Waldenmaier
Telerik team
answered on 07 Nov 2013, 08:12 AM
Hi Francesco,
Have you used the same connection string in VS 2010 and VS 2008. I can reproduce the error when I manually specify an invalid connection string. This example produced the same error.
DATA SOURCE=MYTNSENTRY;USER ID=USER;PASSWORD=PASS;MAX POOL SIZE=1.5
Here the 1.5 is the invalid value that causes this error.

Additionally, can you please ensure that the entries in all of your tnsnames.ora file are the same.
Also for a test please specify English locale settings to see if this works.

I hope this helps to narrow down the problem.

Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 11 Nov 2013, 02:58 PM
Hello Kurt, no progress yet...
connection string is the same in vs2008 and 2010; max pool size is not specified, i only specify data source, user id and password; i've also tried with english locale settings without result. The problem basically i that in vs2010 i can see the list of data source specified in tnsnames.ora, in vs2008 the list is void. So it looks for the tnsnames.ora in the wrong place. The environment variable TNA_ADMIN contains the right path.
Thanks for your help
Francesco
0
Ralph Waldenmaier
Telerik team
answered on 11 Nov 2013, 04:45 PM
Hi Francesco,
I am sorry that the previous steps did not help so far.
To avoid troubles with the tnsnames.ora, you can try to connect to your database by specifying the contents of your tnsnames in your connection string. See the following as an example.
data source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));user id=USERNAME;password=PASSWORD;
Please adjust the needed bits like the HOST to point to your Oracle instance and of course the credentials.

Using this approach, you don't need to use the ODP.NET connection dialog. Just manually enter the connection string to the dialog. See this link for details.

Alternatively, you can also use the EZCONNECT mechanism as connection string. See this example.
user id=hr;password=hr;data source=//sales-server:1521/sales.us.acme.com

More details about EZCONNECT can be found here.

Are you now able to retrieve the database schema information?

Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 11 Nov 2013, 05:25 PM
Hi Kurt, that's another problem: from the telerik wizard even if choose 'set connection manually', i can't specify anything (the text area connection string remains disabled)...again, this does not happen in visual studio 2010
0
Ralph Waldenmaier
Telerik team
answered on 13 Nov 2013, 04:58 PM
Hello Francesco,
Ok. In this case there are two options to manually specify a connection string.

1. Open the Advanced Menu in the ConnectionStrings dialog. Here you can find an Entry called datasource. You can paste the connection details there
'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)))'.
See the attached screenshot for details.

2. Another option is to specify the connection string in the app.config of your new application.
Having done this, create a new empty domain model. Open the .rlinq file with an xml editor and add an AppConfigConnectionPropertyName entry under the 'ModelSettings' node. See the following snippet.
<ModelSettings xmlns="">
    <AppConfigConnectionPropertyName>Connection</AppConfigConnectionPropertyName>
.........
Hence the name, 'Connection' in this case, must match the name of the connection in your app.config.
Save the .rlinq file and open it again with the visual designer. Now when you right-click -> Update From Database you should get the update from database wizard without the need to specify a connection string.

Can you now read your database schema information?
Please accept my apologies for the inconvenience these steps might cause to you.


Regards,
Ralph Waldenmaier
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
0
Francesco
Top achievements
Rank 1
answered on 18 Nov 2013, 09:35 AM
Hello Kurt, i tried both ways without results.
In the first case, i obtain an error window without any message; in the second when i try to update model from database, the message is again 'unable to retrieve db information ORA-22062'. Something doesn't work with the oracle driver. Next days i will reset my pc to install windows 7, i hope things will go better...
Do you have some advice on installing telerik on a 64 bit machine?
Best regards
Francesco
0
Kaloyan Nikolov
Telerik team
answered on 20 Nov 2013, 05:07 PM
Hello Francesco,

There are no any specifics for the Telerik OpenAccess ORM installation on a 64 bit machine. The process should be straight forward. Both the design time and the run-time work on both 32bit and 64bit machines. The only think you should ensure is that you have installed the proper version of the data drivers you use. The data adapter used in Visual Studio is always ran in 32bit because the Visual Studio itself is a 32bit process, your application then can be ran either in 32bit or 64 bit based on your preferences. 

I hope this helps.

Regards,
Kaloyan Nikolov
Telerik
OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
Tags
Data Access Free Edition
Asked by
Francesco
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Francesco
Top achievements
Rank 1
Kaloyan Nikolov
Telerik team
Share this question
or