0

I want to connect to Oracle database, but when I manualy write correct connection string, Visual Studio throws me error: Running transformation: Failed to read database schema - The value's length for key 'data source' exceeds it's limit of '128'. This connection string works, when I connect via code behind code, but when I add it to config file, it throw this error.

I created correct connection string via Data Connections too, but I dont know any way, how can I automatically create it in config file, for example exporting from data connections to config, or something else..

enter image description here

Thanks.

This error is shown when I put there correct connection string...

enter image description here

weto
  • 69
  • 1
  • 1
  • 12
  • 2
    [ConfigurationManager.ConnectionStrings Property](http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.connectionstrings(v=vs.110).aspx) a simple google search would have saved you a lot of time show `Google is your Best Friend` – MethodMan Nov 13 '14 at 18:27
  • I have connection string in code behind, but I want to take it to app.config file, because I want to connect it to DAO (PetaPoco) and it use ConnectionStringName from config file... This cant help me.. – weto Nov 13 '14 at 18:32
  • What do you mean it can't help you what do you mean ....remove the connection string from code behind and place it in the app.config file this is not a difficult task.. also it makes recompiling your code almost unnecessary if you have to reconfigure or point to a different database by only changing the app.config file from one place.. get away from HardCoding – MethodMan Nov 13 '14 at 18:38
  • 1
    @DJKRAZE It would be `web.config` or `machine.config` when in an ASP.NET environment (as this question is tagged). – mason Nov 13 '14 at 18:54
  • mason what are you talking about .. anyway I am waiting to hear from the OP since only he or she can answer this one.. – MethodMan Nov 13 '14 at 19:01
  • DJ, I cant put there correct config, because after it, it doesnt work, look on the error on the picture... – weto Nov 13 '14 at 21:04
  • 1
    So, the error says "The value's length for key 'data source' exceeds its limit of 128. Have you checked the data source key? Look at this: http://stackoverflow.com/questions/24880533/oracle-database-tns-the-values-length-for-key-data-source-exceeds-its-limit or do a search on the error - I found more results which explain this problem – iheanyi Nov 13 '14 at 22:46

0 Answers0