Missing Data Updates - c#

I am having a problem with data not updating on the CRM at my wife's office.
Scenario:
User loads the app.
Data from the DB populates the master view.
User opens edit screen.
Data is populated for the correct detail item.
User changes a value (on any field).
The save button becomes active with
the data change.
The user clicks on save.
The data is refreshed on the edit screen (to prove the update took) and the original data is restored to the edit screen.
The save button is disabled.
Looking at the master data grid,
behind the edit screen, the data
appears to be updated.
Close the edit screen, the new data
is still visible in the master view.
Click on refresh and the master data
reverts to the original content.
All changes are lost.
If I run the exact same scenario on my dev network, the database IS updated.
So what is different between the two environments? There is a domain at the office. I'm using SQL Authentication so it shouldn't matter. I'm running a Win2003 EE with MS SQL 2005 EE VM for my test DB server, which mimics the office DB server. I use backups of the production DB to populate my dev DB. I have double-checked the SQL user permissions. There are no errors in the Event Viewer or in the SQL logs on the DB server. All workstations are Win7 Ent. I run x64 at home, while the office machines are x86. Walking through the code on my machine doesn't provide any insight because everything works in my dev environment.
The app has been around since December 2008. I do monthly updates at a minimum.
ClickOnce deployment.
I need to run SQL Profiler to gatehr more info. Beyond that, I'm clueless. What is really happening? Why does it work in dev and not in prod? Any suggestions on how to track this down?
Thx,
Ivan

after starting the application, but just before save is clicked, rename the table in sql server management studio. See if the application throws an error about the table not existing. If you don't get an error, then C# isn't trying to update the database. if you get the error rename the table back, add a trigger on the table to write to a log table, restart the application, and try the save. check in the log table, did it insert anything? go from there.

Related

No connection with database inside DataGridView wizard

I have a problem with connecting the SQL database inside the DataGridView in C#
When I add a DataGridView window and go to the wizard to add a connection. Then there is no database that can be selected.
I selected the Server name and when I select or enter the name of the database I get this error.
Maybe someone knows what I can do?
Error message:
My Database:
#EDIT1:
I checked the Services and restarted them. But that didn't help.
Also when I click on the drop-down menu to select a database it tells me that it's loading the database and after 10 sec the error pops up as above.
I have really no idea what's the problem.
#EDIT 2:
I have uninstalled and deleted everything that had to do with the SQL and SQL server. I downloaded new SQL server from the Microsoft website, installed it and everything works fine now. I also gave it another name while installing. So not the standard MSSQLSERVER. And now it works.
Tnx everybody for trying to help :)

VS 2012 Report Designer Creating Shared Data Source

I am an intern, our companies report guru was my mentor, but he left 8 months ago and I have inherited his report responsibility.
We are deploying some new servers. I have set up new reports and connections for the INT and STG versions. I have full access to these two servers.
I do not have any permissions for PROD. Our DBA has created the Shared Data Source on the target server. (He created all of the Shared Data Sources on the servers first)
I have attempted to create and connect the Shared Data Source in Report Designer to the Shared Data Source on the PROD server. I have failed.
I have managed reports on our system that point to servers I have no access to. Their shared data sources where set up before my time with the company.
1st Question. Can you successfully set up a Shared Data Source in Report Designer if you have no permissions on the target server?
http://technet.microsoft.com/en-us/library/ms155845.aspx
I have perused this page, and will quote what I feel is most pertinent.
"To create a shared data source or modify its properties, you must have Manage data sources permissions on the report server. If the report server runs in native mode, you can use Report Manager to create and configure the shared data source. If the report server runs in SharePoint integrated mode, you can use the application pages on a SharePoint site. For any report server regardless of its mode, you can create a shared data source in Report Designer and then publish it to a target server. "
2nd Question. Does order of operations matter in this case? The last sentence says I can create the data source and then publish it to the server. Would that provide different results then creating it on the server first, and then creating it in Report Designer?(In INT and STG our reports deployed properly with this second method)
Thank you for taking the time to answer these two questions. I hope my background information was clear enough.
Question 1. Yes, you can.
Question 2. Unsure.
My personal problem ended up being a firewall issue. Once the firewall issue was taken care of I was able to successfully set up the connection and deploy the working report on the server.
There have been some minor issues with the set up of the connection. This leads me to believe that the ideal order to set up the connections would be to create the shared data source in Report Designer and publish it to the target server.
I have not been able to replicate the precise problem, so the issue might just be between the keyboard and the chair and there is actually no issue changing the order of operations.

How to Update Tables of Offline .Net App Using SQL Server CE from SQL Server When Available

I am working on a windows app for sales reps that they use in the field. They do not have an Internet connection in the field so I am looking to build some kind of update solution that they can use while they are in our home office.
The general idea would be that the sales rep clicks an update button while in the office. The app downloads the latest list of clients into a SQL Server CE table. The sales rep then proceeds to visit his/her customers and fills out a questionnaire in the app. Each answer is saved for their client(s) in the SQL Server CE database. When the user revisits the home office and clicks the update button, the recorded data is inserted into the questionnaire table, their local database notes the success of the data being inserted, the old local customer list is dropped and the latest customer list is retrieved from the SQL server into their SQL CE database. Rinse and Repeat.
I am used to building ASP.Net sites and a few applications that would never do this process normally. I am coding in C# and am using CodeSmith on the data layer side. What would be the recommended best practice and .Net tools to accomplish this kind of scenario? Thanks in advance for your guidance.
I think the MS Synch Framework would be the best solution for your scenario.
See the walkthrough in creating an application leveraging the synch framework

accessing database

Here is my problem; I have a hosted and published database on godaddy servers. I have also published my website. However, when I tried to use one of visual studio's tools such as chart, or data view or any tool that wants me to specify a data source, I get the
"error 40: could not open a connection to sql server".
In most cases, I have worked around this issue by writing the code instead of using these tools on the ".cs" sections, but now I need to update my database model and I really would prefer not to write that amount of code. The connection string I choose works perfectly, it can update and gather values from database on the published website. But when I Right click on the models section and select "update model from database" the update wizard cannot access the database with the very same connection string. Like I said, this problem occurs on every tool that wants me to select a data source.
Is this a permission issue regarding visual studio or something else?
Thanks in advance.
By default, Go Daddy does not allow access to your database from anything other than your shared hosting account. We allow you direct database access from other locations if you select that option at the time you created the database. If you did not select this option when you created the database you will never be able to connect to it from a location other than your hosting account. If you did not select this option at the time you created the database and need to add that option you will have to create a new database with the option selected.

iPhone Synchronizing SQLite with Windows Server Database

Background information:
I have been building an App that allows users to interact with each other, post comments/images for the App etc and these all information gets displayed on my App's FanWall screen. I am getting users information using their FaceBook authentication through FBConnect.
To update fanwall screen efficiently, I want to have a local SQLite database for my App that contains userId, his profile image, his comments for my App etc. I have all these info in my SQL server database but not sure how to synchronize this info with iPhone's SQLite database.
My problems:
I am using ASIHTTPRequest to query my SQL database and it can return whole table as Array of C# .NET class. The things that I couldn't understand is;
how to parse this C# .NET class using Objective-c to fetch each class object that is corresponds to each row.
I can then update my local SQLite using this object information but what could be best way to update only rows that are changed? Ideally I should be able to get only required rows from SQL server Database so that I just need to insert them in SQLite. I saw this post but not much helpful for my problem. Just wondering if there is any tool out there that can do this synchronization? I can have tables exactly same on SQL Server and SQLite.
Please let me know your thought on this.
Thanks.
I'm working on a similar problem. How to keep in sync a remote database with a local database. Either end could add or update rows. The solution seems to be to keep a column in each table called lastModifiedDate. This column is set on the server so there will be uniform time.
Periodically, connect to the server and request all rows greater than your local lastModifedDate to get updates and adds. Also, when you push your local changes to the server, the server should modify the lastModifiedDate for uniformity.
I haven't seen a framework for something like this.

Categories