Error in connection for the first time, then it works after that (with the same string)

I have a problem of connection error strange that a "OracleConnection.ConnectionString is not valid" with my program ASP.net/c#, but when I try the page again once it works after that.
I create the connection string in the code and then pass it a bit like this:

* private readonly OracleConnection conn = new OracleConnection (oradb); variable in class *.

* / / in the Page_Load method *.
_oradb = "password =" + oraPassword + ";". " User ID =' + oraUserName + '; Data source = mydb; » « ;" *
_conn. Open(); *


User/login name are also generated and inserted in the connection string and when you debug checked the connection string and it's exactly the same every time. It is as if the connection is interrupted and the first time, it attempts to restore, it gives the error, but then it opens the connection after that and failed again in the same window.
Any ideas what this might be caused by? I close the connection to another method, after all I want to be the DB and written on the screen.

The web server is IIS, is the version of .NET 3.5 and the library referenced Oracle is Oracle.DataAccess.dll. In addition, the DB version is 10.2.0.4. Don't know if everything what is necessary, but I thought I'd throw out there, just in case.

Edited by: psaleh may 24, 2010 23:37

When you create here of the OracleConnection object.

* private readonly OracleConnection conn = new OracleConnection (oradb); variable in class *.

_oradb might be empty or invalid during the first.

Instead, try this-

* private readonly OracleConnection _conn = new OracleConnection(); variable in class *.

* / / in the Page_Load method *.
_conn. ConnectionString = "password =" + oraPassword + ";". " User ID =' + oraUserName + '; Data source = mydb; » « ;" *
_conn. Open(); *

There is a separate forum for the ODP. NET-
http://forums.Oracle.com/Forums/Forum.jspa?forumid=146

Tags: Database

Similar Questions

  • My screen freezes 1 min after that I start my PC (only the first time) then it works throughout the day

    It only freezes once and for some strange reason windows crashes when I click on Administrative Tools.

    Additional information from the double wire:

    I have absolutely no problem, except that Vista freeze 5 min after the first start of the day, and then it works fine.

    I also run a memory test and it found nothing.

    It's a hardware problem, because the problem persists after reformatting. Thanks for making me reformat the computer, guys.

  • SimpleDateFormat giving different results for the same string in the form

    I use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/i18n/SimpleDateFormat.html for formatting my date and time fields.

    I got a bug report that a device on English (UK) has a problem where the time turns off the screen, and I was able to reproduce this on device and Simulator.

    It's the pattern string that I use: hh:mma

    (hour 2 digits, colon, minute 2-digit and one letter for 'a' or 'p')

    English or r I get the result you want, for example 12: 12 p '

    "On English (UK), I get two letters for one / p marker, for example ' 12:12.

    (as if I had used 'hh:mmaa').

    What is the desired behavior? My client doesn't like it and wants a look and feel unique, with only one letter for 'a' or 'p', and I'm a little hesitatant to use aubstring...

    I usually do so, but our customer asked specifically localized to the date and time formatting.
    I have the model in my resource files, as the requested values are not easy to manage with the dateformat standard.

    Well, I have submitted comments on the entry of doc API, the doc is fake or the OS has a bug.
    I use substring if the string endsWith (am or pm) now...

  • Error when connecting on the generator of workflow after the installation... for the first time!

    Hello

    I installed Oracle Workflow Builder 2.6.3 recently on my system and after installation, when I'm trying to connect the generator of workflow (using the name of this particular instance database username/password), it throws me the following error message:

    220: cannot set NLS_LANGUAGE.
    210: oracle error: ORA-01403: no data found
    . SQL text: SELECT FROM WF_LANGUAGES WHERE NLS_LANGUAGE: l IN (NLS_LANGUAGE, CODE)

    In previous discussions when I searched for the same problem, I found that if
    Select the value from v$ nls_parameters
    where parameter = "NLS_CHARACTERSET";
    Returns the value of other WE8ISO8859P1 then, then that is what I should change my Builder NLS_LANG entry - i.e. AMERICAN_AMERICA. < character set >.

    But I don't get where should I change the NLS_LANG, located where... a file any? I'm new to workflow.
    Please help me. I tried a lot of things. Any help will be much appreciated.

    Thank you
    Khadi

    Khadi,

    It is windows server? You can try this

    Set NLS_LANG as an operating system environment variable:
    
    1. Select Start - Control Panel - System
    
    2. Select Environment 
    
    3. Set NLS_LANG parameter to AMERICAN_AMERICA.UTF8.
    

    Or try this

    1. define NLS_LANG Environment Variable on your PC, following below navigation :
    
    For Windows
    Start / Settings / Control Panel / System / Advanced / Environment Variables
    Define new "System Variable" NLS_LANG and assign it the value AMERICAN_AMERICA.WE8MSWIN1252
    
    Save
    
    2. Bounce the PC
    
    3. Try again database connection from Workflow Builder
    

    Concerning

    Published by: OrionNet on January 2, 2009 03:28

  • I can't import sounds, it says generic error! Why do these programs work in a first time, then you must go out of your way to remedy?

    I can't import sounds, it says generic error! Why do these programs work in a first time, then you must go out of your way to remedy?

    This program used to work fine, but now I have to beat around the Bush to import a track, why you have to do the unnecessary updates that make the program does not more properly? Bored you guys, you want us to come talk to you, so you can say oh simple: Download this codec or something else, what would you say you don't screw with it in the first place?

    Please don't answer this question, I found the way to do not delayed.

    Look at what did you answer, you listen to yourself?

  • What is the best product for a first time user of WORD PRESS to design a web page of writing-blogging?

    What is the best Acrobat product for a first time web page or blog page - very technical designer - to design a place to show the writing and blogging information?

    You can use these options for WP blog in Muse:

    http://musewidgets.com/search?q=WordPress

    Thank you

    Sanjit

  • Direct DB request - Connect 2 patterns using 2 pools of connections at the same time?

    Hi all

    Will be "Request for Direct database" feature allows to connect to two pools of connections at the same time?

    Output report is based on the UNION of two select statements from two schemas, two pools of connections are created to access two schematics

    First select statement comes from a single schema and second select statement just forming the other

    Select Column1, Column2, Column3 from A, B, C
    UNION
    Select column4, column 5, column6 of X, Y, Z

    A, B, C paintings come from the first schema and X, Y, Z come from another

    How to get the above out put using "application for Direct database"

    Kind regards
    SMA

    It is a very bad idea. If you connect to the same base, then it will be much better to simply synonymous and grants between the schema1, schema2 objects so that you can use a single connection. You query will go much quicker since the BI server do not have to run separate queries to stich together data. If the data are two different databases, it is advisable to do some ETL and group all the data in your Data Warehouse database.

  • Dial-up modem works for a short time, then he said "no dial tone".

    original title: Dial-up modem works for a short time, then he said "no dial tone" does not matter if the modem is to maintain or external. The same thing happens

    Living in an area where the wireless, wifi, broadband is not available, only wheel upwards. Modems worked well for a time, then more nothing. Use xp pro on a Dell computer

    Hello

    1. your phone work when modem says no dial tone?

    2. you have made no changes to the computer before the broadcast took place?

    3. What is the number of brand and model of Modem device?

    Follow the methods mentioned below:

    Method 1:

    Step 1: Run modem diagnostics .

    Note To follow these steps, use the default view of 'Category' in the control panel instead of the "Classic" view

    1. quit all programs, and then close all open windows.

    2 click Startand then click Control Panel.

    3 click on Printers and other devices. Click phone and Modem Options. Click the Modems tab.

    4 select the modem for which you want to run diagnostics on the modem. If you are unsure what modem to select, contact the manufacturer of your computer.

    5 click Properties. Click on the tab Modem Set the Maximum Port speed to 57600.

    6 click the Diagnostics tab.

    7 click Query Modem. If the modem answers and functioning, the information about the modem appears.

    Step 2: Run the Network Diagnostics.

    Network Diagnostics for Windows XP is available to help identify and fix network connection problems

    http://support.Microsoft.com/kb/914440

     

    Method 2:

    How to troubleshoot "No dial tone" issues in Windows XP

    http://support.Microsoft.com/kb/326681

     

    I hope that helps!

  • Is it possible to have two mice connected at the same time?

    Hello. I have a gamer mouse, and I am pretty tired of changing the battery every now and then. So I was wondering if I could connect a wired mouse, I could use on the desktop, while my current mouse is always connected - for when I want to do some gaming. Windows Vista will allow that I have two mice connected at the same time?

    Hello

    You can connect two mice of universal Bus controller to the computer, but it goes to show that a single pointer.

  • vWorkspace 8 - VDI Windows 7 "Error cannot connect to the server '.

    Hello

    We are soon about to begin the deployment of our vWorkspace VDI solution. We have Windows 7 Client s connection to Win 7 Pro 32 Bit VM on Hyper-V.

    Sometimes when the user intiates a connection to the desktop of Windows 7 VDI published the vWorkspace Client launch and are trying to connect, and then an error will be presented "Error cannot connect to the server. We do not understand all the time and it is random.

    Go it is addressed urgently as it's going to cause some major headaches with our users.

    Someone at - it ideas?

    Cool, thanks Dan.

    I'll find the case of Mike and send the info from there.

  • Incomplete reference of connection for the scott connection object

    Hello

    my application works fine in JDev 11.1.2.1 when deployed to integrated WS
    at the same time to the stand-alone deployment, I see an error:
    Incomplete reference of connection for the scott connection object
    Houston-26061 something wrong with JDBC

    the connection that Scott is defined as a data source
    where can be a problem?

    John is right. Configure the jdbc data source in wls and reference him module of your application configuration.
    If you look at the example of my blog and check the configuration, you will see that I have to refer to as "jdbc/DDH" jdbc data source My WLS I put in place since a data source with exactly this pointing to the BD JNDI name I want.

    Timo

  • I need a few files to restore from a time machine backup to a different MacBook Pro that is connected to the same network

    Hi, I recently "lost" my MacBook Pro because of water damage.  Fortunately, I've been using time Machine\Capsule and I have a MacBook Pro that is connected to the same network/device.  I need to restore a few files in the backup TM of the computer 'lost' on computer 'work '.  I was able to 'Browse' the other TM backup (click the icon TM plus the button 'Alt').  The Web browsing is extremely slow (took about an hour to break down / find the file on the network).  However, I tried to copy the file and I get errors of the alias.   Please advise me on what I am doing wrong.

    Thank you

    ggnpeter

    PS My OS is 10.9.5

    Visit Time Machine FAQ of Pondini helps with Time Machine.

  • Windows XP keep getting an error code 0xD59 for the Service Pack to update KB2463332 & will not update?

    I get an error code 0xD59 for the update of Service Pack KB2463332?  Then he wants to resart my computer for an update failed?  Why?

    Hello


    Click on the below mentioned link to manually install the update on your computer.

    Microsoft SQL Server 2005 Express Edition Service Pack 4 for Windows XP.
    http://www.Microsoft.com/en-US/Download/details.aspx?ID=184
    After you install the update, restart your computer and check if the problem is resolved.
  • 5520 HP usb and a wireless connection at the same time

    I have set up my new 5520 HP with USB connected to my desktop (Vista) for maximum reliability and can print via printer share from my laptop (XP), but I'm obviously missing out on HP web services.  Can I have the USB connection or wireless connection at the same time?

    Hello f1charlie,

    Its new r: YES, because it would be 2 printer icons. One for the USB and the other for the wireless.

    The icon of the printer wireless would be similar to Hp 5520 (network).

    You can set these printer (USB or network) icon to by default.

    But again, every time that you want to print using any application. Click file > print, which will display a dialog box, where, in, you can select the printer icon.

    Kind regards
    Jabzi

    Help the community by marking this post.
    Your question has been answered? Mark it as a accepted Solution!
    See a great post? Give it a Bravo!
    I work for HP

  • Update cache - unexpected error of blocking for the repository &amp; oracle.webcenter.framework.service.RepositoryVersion cannot be cast to oracle.webcenter.framework.service.RepositoryVersion

    Hello

    I noticed that the following errors appear often in my custom portals managed servers. Can anyone tell why these errors appear as I applied all the necessary patches?

    Oracle WebCenter Suite 11 g 11.1.1.8.0 portal applied Patch 21281035

    < 11 November 2015 11:00:08 SGT > < error > < oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdateTimer > < WCS-55198 > < Cache update - unexpected error of blocking for the repository.

    java.lang.ExceptionInInitializerError

    at oracle.webcenter.content.internal.stellent.VCRConfigProvider.getRepositoryConfig(VCRConfigProvider.java:99)

    at oracle.webcenter.content.integration.federated.internal.delegate.RepositoryHelper.getRepositoryConfig(RepositoryHelper.java:601)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.getBinaryCache(CacheHelper.java:56)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.flushAllBinaryCacheEntries(CacheHelper.java:254)

    at oracle.webcenter.content.integration.federated.ContentCacheHelper.flushAllBinaryCacheEntries(ContentCacheHelper.java:54)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateNodeEntry(UCMCacheHelper.java:175)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateCacheEntries(UCMCacheHelper.java:138)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdater.updateCaches(UCMCacheUpdater.java:83)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdateTimer.run(UCMCacheUpdateTimer.java:105)

    at java.util.TimerThread.mainLoop(Timer.java:555)

    at java.util.TimerThread.run(Timer.java:505)

    Caused by: java.util.MissingResourceException: can't find oracle.webcenter.content.integration.internal.logging.VCRLogger bundle

    at java.util.logging.Logger.setupResourceInfo(Logger.java:1537)

    to java.util.logging.Logger. < init > (Logger.java:267)

    at java.util.logging.LogManager.demandLogger(LogManager.java:433)

    at java.util.logging.Logger.demandLogger(Logger.java:346)

    at java.util.logging.Logger.getLogger(Logger.java:442)

    at oracle.adf.share.logging.ADFLoggerFactory.getADFLogger(ADFLoggerFactory.java:63)

    at oracle.adf.share.logging.ADFLogger.createADFLogger(ADFLogger.java:221)

    to oracle.webcenter.content.integration.RepositoryException. < clinit > (RepositoryException.java:31)

    at oracle.webcenter.content.internal.stellent.VCRConfigProvider.getRepositoryConfig(VCRConfigProvider.java:99)

    at oracle.webcenter.content.integration.federated.internal.delegate.RepositoryHelper.getRepositoryConfig(RepositoryHelper.java:601)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.getBinaryCache(CacheHelper.java:56)

    at oracle.webcenter.content.integration.federated.internal.delegate.CacheHelper.flushAllBinaryCacheEntries(CacheHelper.java:254)

    at oracle.webcenter.content.integration.federated.ContentCacheHelper.flushAllBinaryCacheEntries(ContentCacheHelper.java:54)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateNodeEntry(UCMCacheHelper.java:175)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.invalidateCacheEntries(UCMCacheHelper.java:138)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdater.updateCaches(UCMCacheUpdater.java:83)

    at oracle.webcenter.content.integration.spi.ucm.UCMCacheUpdateTimer.run(UCMCacheUpdateTimer.java:105)

    at java.util.TimerThread.mainLoop(Timer.java:555)

    at java.util.TimerThread.run(Timer.java:505)

    < 11 November 2015 11:01:07 SGT > < WARNING > < oracle.webcenter.notification.internal.model.util.FrameworkUtils > < BEA-000000 > <

    java.lang.ClassCastException: oracle.webcenter.framework.service.RepositoryVersion cannot be cast to oracle.webcenter.framework.service.RepositoryVersion

    at oracle.webcenter.framework.service.ServiceContext.getRepositoryVersionObject(ServiceContext.java:1283)

    at oracle.webcenter.framework.service.ServiceContext.getRepositoryVersion(ServiceContext.java:1185)

    at oracle.webcenter.framework.service.ServiceContext.isRepositoryVersionGreaterThanOrEqualTo(ServiceContext.java:1221)

    at oracle.webcenter.peopleconnections.profile.internal.extension.ProfileService.isConfigured(ProfileService.java:41)

    at oracle.webcenter.framework.service.ServiceRegistry.getAllConfiguredServices(ServiceRegistry.java:213)

    at oracle.webcenter.notification.internal.model.util.FrameworkUtils.loadServiceActivityTypes(FrameworkUtils.java:94)

    to oracle.webcenter.notification.internal.model.NotificationServiceImpl. < init > (NotificationServiceImpl.java:109)

    at oracle.webcenter.notification.NotificationServiceFactory.getNotificationService(NotificationServiceFactory.java:89)

    at oracle.webcenter.notification.internal.model.LifecycleListener.contextDestroyed(LifecycleListener.java:68)

    at oracle.webcenter.framework.internal.view.WCFrameworkContextListener.contextDestroyed(WCFrameworkContextListener.java:208)

    to weblogic.servlet.internal.EventsManager$ FireContextListenerAction.run (EventsManager.java:482)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:200)

    at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3225)

    at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:247)

    at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:461)

    at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1545)

    at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:509)

    to weblogic.application.internal.flow.ModuleStateDriver$ 2.previous(ModuleStateDriver.java:387)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)

    at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:141)

    at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:206)

    at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:261)

    to weblogic.application.internal.flow.DeploymentCallbackFlow$ 2.previous(DeploymentCallbackFlow.java:547)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)

    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:192)

    at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:184)

    to weblogic.application.internal.BaseDeployment$ 2.previous(BaseDeployment.java:677)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)

    at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)

    at weblogic.application.internal.BaseDeployment.deactivate(BaseDeployment.java:234)

    at weblogic.application.internal.EarDeployment.deactivate(EarDeployment.java:59)

    at weblogic.application.internal.DeploymentStateChecker.deactivate(DeploymentStateChecker.java:198)

    at weblogic.deploy.internal.targetserver.AppContainerInvoker.deactivate(AppContainerInvoker.java:98)

    at weblogic.deploy.internal.targetserver.operations.DeactivateOperation.deactivate(DeactivateOperation.java:78)

    at weblogic.deploy.internal.targetserver.operations.RemoveOperation.removeDeployment(RemoveOperation.java:306)

    at weblogic.deploy.internal.targetserver.operations.RemoveOperation.doCommit(RemoveOperation.java:114)

    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)

    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)

    at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)

    at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)

    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)

    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)

    in weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$ 100 (DeploymentReceiverCallbackDeliverer.java:13)

    to weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$ 2.run(DeploymentReceiverCallbackDeliverer.java:68)

    to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:545)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    >

    Hello

    Please apply the MLR 14 and check the box.

    If the problem persists, please update us with the WCC and newspapers of WCP.

Maybe you are looking for

  • Cannot add old calendar entries

    For some reason any my calendar doesn't let me add entries for the previous months, it add me, I click done and then the point will appear under the date, then it disappears!  Any help would be appreciated thanks

  • How to synchronize clocks on USB-6009 and USB-6343

    Hello Can anyone provide an example on how to synchronize clocks on USB-6009 and USB 6343? I checked the example screws, but it shows that we must use 2 counters, one as the clock of the source and the other as a trigger. But only 1 CLK 6009. I read

  • Segmentation fault (SIGSEGV)

    I use DAQmx code from a DLL that I have developed. I call this DLL from C++ code. Everything works well until a certain point. I can read the DAQ, erase it and reset. The accident occurred when I close the application. The fault that happens in the f

  • System will not be activated. Receive the error message "system could not establish a connection with the activation server.

    Activation. My OS system has been altered, so I formatted and installed new, but can not activate. I have this installation id 348020-631951-163976-154093-556113-629786-940105-229483-661432, I need confirmation id because my system could not establis

  • Programmable keys with Android 5.0 + status bar in the lockscreen

    Hello is there a chance to hide the softkeys with android 5.0 as in android 4.4? otherwise, the display is very small... and another problem is that I don't get whatsapp icon if I get a message in the status bar if im in the lockscreen