Why whenever touching Server Explorer, database contents is erased? - sql-server-ce-4

Update
I've just found what's causing it but couldn't solve it :
When running the project, VS copies the SDF file to bin\Debug, therefore, any changes made to it, even if only refreshing the DB will cause it to be overwritten...
I've created a quick and dirty project to test SQL CE 4.0, designed a small table and added an Update button to save entered data. So far everything works, I close and reopen the application, data is loaded and shown in the DataGridView.
There is one issue however, whenever I make any changes in Server Explorer such as just refreshing the connection,
when I launch the application again, all the data I entered is gone.
Did I miss something ?
How I created the database :
From Data Sources I've added a new data source, created a new connection, created a new database, answered yes for copying it to my project and modifying the connection.
Then from Server Explorer I created a new table, added columns
Finally, I reconfigured my data source so it recreates the data set, data table and the adapter

Here is a fix for it :
Do not copy it locally to the project folder, there won't be two versions with one overwriting the other.

Related

Rstudio tries to access parent directories where I don't have access rights and crashes

My Project is in a shared drive //company/me/project/
I have full read/write access to //company/me/
I have 0 access rights in //company/
Once in a while my Rstudio crashes with the following message
Unexpected exception: rstudio_boost:filesystem::status: Access is denied: "//company
After this i can no longer open my project via Rstudio.
The only workaround i have found is to delete .Rproj.user and create a new project in the same folder
Why is Rstudio trying to access //company/? Is there a configuration I can set to prevent this from happening?
Edit: I have noticed that this usually happens when theres a bug in my code or when I try to stop code that is running.
A possible reason can be that Rstudio (along with R), saves your session to a .Rdata (either by default or possibly because you clicked "Yes" when it asked to save the workspace to .Rdata). R does this to track reproducibility of a session i.e. to determine the last state when Rstudio was closed (or crashed in your case).
And now its trying to restore an exception , which cannot be reproduced as it requires opening up the file and running it (and opening it, is what you want in the first place).
Note that as per RStudio Documentation: .Rproj.user also stores project-specific temporary files (e.g. auto-saved source documents, window-state, etc.).
A recommended solution to this is to set option for never saving the session data i.e. every time Rstudio starts , it is starting with a clean slate for your project. If you are concerned about loosing the commands you ran in your last session , set the option of Always Save History (Even when not saving .RData). See the image below to set things as a default (sourced from Hadley's Comment):
The same settings are also present for a Project too:

SSIS 2005 how to resolve the error "input column has lineage id that was not previously used in the data flow task" programmatically

I'm trying to write a program that automatically add columns from the OLE DB Sources in all of the components in a .dtsx file (the target is SSIS 2005). When I process the .dtsx with my program seems that the columns are added correctly, but when I open the modified package, in the components appears this message:
input column has lineage id that was not previously used in the data flow task.
If I double click on the component and then I press OK the error disappear.
My question is:
is there a way to have the same behavior programmatically? I'll try to automate this operation for the user by using this program but with this error block me in the project.
i had this problem, i could resolve that by bellow solution but i know it's not useful solution.
meta data can not detect your changes , you can delete your task and create again that task.
Both source and destination column must have the same linage id.

Why does building in Xcode overwrite my SQLite database?

First of all, I'm not using Core Data, I'm using SQLite only.
I save the data in the table and then query them by opening the app and looking at the data using SQLiteStudio. I even create a LOG to check that the data is saved, and yes, it is saved.
But when I STOP and run the simulator again to consult, there is no more data!
Is Xcode overwriting the database every time? Or is something else happening that is outside my limited knowledge?
Without knowing more about how your application is setup, how you've got your app configured to build, or how it operates on the SQLite DB file in question I'll only be able to offer some pointers in things you can go check out about your code and build configuration that may be the source of your phantom deletions. Of course, if you have other info to provide, I'd be happy to edit my answer!
Case 1: 'Create DB' always running?
One thing that may be tripping your app up is what happens leading up to the decision to create a new SQLite DB file or look/open an existing file. If the code creating an empty DB is always running, then each time your app starts, your old DB file is getting overwritten with a blank DB.
Case 2: Using a 'starter' or 'template' empty database?
Sometimes developers may provide a blank database that contains the initial database schema (the general tables and structure) as well as some default or sample data. If your app does this, perhaps the logic leading up to the decision to apply that default database is accidentally always being triggered? If so, use of NSUserDefaults to record a boolean indicating the DB was successfully created may be an avenue to use to skip past the 'Load my starter DB' code. Alternatively, you could check for the existence of your DB file, or see if the contents of a specific table are different from the template data, etc.
Case 3: Different Behavior between 'Build & Run' vs. 'Run Without Building'
There's a not-so-well-known option in the Product > Perform Action menu labelled 'Run without Building' that will essentially kickoff another Debug session using the version of the application you just finished running in the Simulator or on Device. When you use this option do you see any different behavior with your database or is it still blank?
Case 4: Different Behavior when run directly in Simulator outside of an Xcode debugging session?
Part of the 'Run' operation is a build phase which may trigger the 'Copy Resources' phase even if your app hasn't changed since the last execution (as you suggest is the case in your question). If you are providing a stock 'default' or 'template' DB file and your app is simply opening and editing that 'template' during the first execution of your app, then Xcode may be replacing it with a clean copy on the subsequent 'Run' operations where 'Copy Resources' is happening. A way to test this avenue:
Build and Run your app to the simulator using Xcode like normal.
Perform some operations that would result in the creation or editing of data in your app's database.
Click the stop button in Xcode to return to the Simulator home screen.
Double-click the home button on the simulator (or if there is no home button, press CMD+SHIFT+H twice to bring up the multitasking bar and force-quit out of your application.
Check and see if your DB file has data in it.
If no data, then there is an issue persisting your changes into the database and we need to get that problem solved first. Otherwise:
Relaunch your app directly from iOS Simulator and perform different operations that would result in more or different changes to the database.
Click on the home button to return to the iOS Home Screen.
Force-quit your appellation as was done in Step 4.
Check and see if your DB file data has changed (but still has data) or has blanked out.
Finally, make sure you are following Apple's guidance about where to store user-data, if you are inadvertently storing something in an incorrect file path doesn't typically result in blanking of data, it may be prohibiting writing of data which could be interpreted as your data getting overwritten especially if you are interrogating it while it still is residing in an in-memory process. There's some really useful guidance about file paths in the Table 1-1: (http://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html)
Locating your Simulator App on your Mac's Hard Drive
To be thorough (and you may already know about this!), iOS Simulator applications are stored on your Mac's hard drive just like other files on your machine. Their organization mimics that of a physical iOS device. To get to your App and its data:
Open a new Finder window.
Press CMD+SHIFT+G or choose 'Go to Folder' from the 'Go' menu.
Paste the following into the 'Go to Folder' box then click 'Go': ~/Library/Application Support/iPhone Simulator/
Select the folder that matches the iOS version of the simulator you built to.
Click on Appications.
You'll then be presented with zero or more folders, each folder that appears will have a string of digits separated by hyphens. Navigate through this list until you find the one containing your app. You can then browse, and copy data out of this folder to somewhere to be examined by other tools on your Mac.

Crystal Reports delay shows old data when using MS Access

Here is in interesting one.
I have a Crystal Report that uses a single Microsoft Access 2007 table. The data in the table is updated at run time based on criteria from a list box.
If I select one entry from my list it updates the data and shows in the report. If I select and different entry is shows the data the old data. If i select that report enough times it will eventually show the new data.
The data in the access data base is updated as I checked manually
My problem is that there seems to be a delay in between the data updating and the report showing the new data.
Is there anyway to reduce this delay or get my program to wait until access has finished updating ?
Here's some ideas:
If you're mixing cr-xi with VS2010, and have no real reason to do so, then uninstall xi and install the new libraries for VS2010. I had issues mixing cr-xi with VS2010.
There's an option to save data with report. Make sure that's turned off. If it already was, turn it on, run the report, then turn it off again.
You can try rpt.Refresh(), right before crystalReportViewer1.ReportSource = rpt.
This page had some ideas, including the last one I listed.

QTP locked cells cannot modified

for whom using QTP(Quick Test Professional) do anyone of you face this issue on data table upon savin script on QC(Quality Center).
When you try to edit "DataTable" message box says that "locked cells cannot modified" displays.
kindly see the attached snapshot.
your help and support is highly appreciated.
Thanks,
Manaysah
I have found that the following procedure corrects this problem:
Open the test in QTP
Check it out
Right-click the datatable
Select File > Export…
Browse to the location where you want to save the export file
Enter a file name for the export file
Click Save
Right-click the datatable
Select File > Import
Browse to the location where you saved the export file
Select the export file
Click OK
Datatable should now be unlocked.
If you are using QC 10.0 to store/save your QTP 10.0 scripts ,then you can try following.
Verify what patch level your QC 10.o on if you are on patch 28 then you have to apply patch 29 on QC.
Defect ID: QCCR1J 24598
Problem: An automatic job runs every fifteen minutes that cleans the database of stale sessions and locks.
A regression prevents locks from being deleted if the Quality Center client was terminated abruptly.
This causes entities to remain locked even after the LOCK_TIMEOUT and the entities cannot be edited.
A workaround existed to physically delete the locked rows from the database

Resources