Click here to Skip to main content
15,889,838 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi ,

I have a wpf project that used data from some server on the net.
all my users suppose to have access to internet so it's not suppose to be a proble, in that matter.

I tried to create a setup project today after I checked that everything works as it suppose to, and after I installed it I discovered that there's might be a problem with connecting to the database, because suddenly any procedute that suppose to approach the DB doesn't work.

in my application I have a seperate projects for BLL and DAL to deal with openning/ closing and configure the connection details.

this is the app.config part, refering to the connectionsrting.

XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <connectionstrings>
        <add name="oracle_vc" connectionstring="data source=xxx;persist Security info=true;user id=x;password=23;unicode=true" providername="system.data.oraclecleint" />    </connectionstrings>
 ...
</configuration>



Edited:
In other words-
I don't get any errors BUT, all I can say is that on a button click event, there's suppose to be a function checking if an item is exist in the database and if so, it goes to a new form. otherwise I get a msgbox saying "item doesnt exist".
In debug mode everything works fine (MEANING: if item exists > a new form opens).
When I create a setup project and run the application, I get for the same items I found earlier , the msgbox- "item doesnt exist", and that led me to the conclusion that something is wrong in the part that refers to approching the database.
Also since I'm using oracle connection string in my app.config file to connect to the database - like I used to do in winforns, I thought that maybe it's not working the same way in WPF and maybe that's what causing the problem.

Any help will be appreciated.


Thanks
Posted
Updated 3-Jun-13 21:20pm
v3
Comments
[no name] 3-Jun-13 7:45am    
"Do you have an idea what's my problem?", nope sure don't because "doesn't work" does not tell us anything about the errors that you are getting.
Sergey Alexandrovich Kryukov 3-Jun-13 9:43am    
How a connection string could be relevant to WPF? Ever heard of separation of concerns?
—SA
danait25 4-Jun-13 2:58am    
You don't need to be so harsh- I'm only new in this area :/

Anyway, I coundn't add any errors because I don't get any errors - all I can say is that on a button click event, there's suppose to be a function checking if an item is exist in the database and if so, it goes to a new form. otherwise I get a msgbox saying "item doesnt exist".
In debug mode everything works fine (MEANING: if item exists > a new form opens) BUT when I create a setup project and run the application, I get for the same items I found the msgbox- "item doesnt exist", and that led me to the conclusion that something is wrong in the part that refers to approching the database. Ain't it a reasonable conclusion?

And about the other comment- I'm using oracle connection string in my app.config file to connect to the database - that's what I'm familiar with from winforms - maybe it's not the same in WPF project and that's what causing the problem,and that was the reason I asked.
Sergey Alexandrovich Kryukov 4-Jun-13 3:38am    
OK, your experience with Forms should have told you that UI has nothing to do with connection string. Orthogonal things, if you will. What's so harsh? If you are asking questions here, you are supposed to try to do some thinking, no matter if you are new or not. Both my statements were questions for you, and you did not answer them. It's for your understanding, not for attacking you personally; please don't think this way and don't feel offended. The real meaning of this is to suggest you a right way of thinking...
—SA
koleraba 5-Jun-13 17:17pm    
You could add logging(if you don't have it alredy) to those parts of the application you suspect are responsible for the problems you are experiencing. This way you will be able to exactly pin-point the location of your error and than move on from there. If you are not familiar with any logging frameworks try log4net. It's easy to set up and I never had any problems with it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900