loss of data on dataset - database

I was checking my database when I saw this problem.
I added 1 line of data on my database and when I run the program it didn't show up, so I removed the datagrid view from my form and configured the datasource with the wizard.
After I have configured my datasources with wizard (in this case my datasource is supDataSet), and dragged the datagridview and run the problem I realised that I loss the data that there was on the dataset. And I can see the data that I inserted into the database.
Can anyone help me with this? Is this normal ? And how to avoid this situations? And why the data that I inserted into the database didn't show ?
And if this is normal is there any way to transfer the data at the dataset to the database ?

Related

QGIS can't load and edit MSSQL layers anymore

I have QGIS 3.4 Madeira LTR connected to my Microsoft SQL Server Management Studio 17. I have a lot of data on the SQL Server and since the start of the new year I can't edit my layers in QGIS anymore. I can load the data but it doesn't visualize and I can't zoom on the Layer Extent (In Options it says Extent=Empty but thats not true, because I checked the tables on the Server and they are structured like before). The weird thing is, when I load a layer from my harddrive everything works just fine. The loaded layers from my SQL Server show up but I can't open the attribute table or select features. In some cases Im able to open the attribute table but it only shows one entry (no filters activated). I was thinking that something is wrong with the geometry or the CRS but I did not update the software or change anything in the SQL tables. QGIS even crashes when trying to open attribute tables. It gave me the option "try to repair the map document" but after trying it the connected SQL Table disappeared on the Server but is still visible in the MSSQL dropdown menu on the left (but the data on the SQL Server is definitely gone). Also weird is that saved map documents show the data when I open them but when I add a new SQL layer the data doesn't show up. I would really appreciate some help.
I checked the SQL tables if maybe some primary keys were missing or the geometry column. I checked my update history but nothing was updated. I'm a bit lost where to start and scared to lose more of my data.

Is there a way to update an oracle database by simply editing a table in excel?

I have gotten oracle database to connect to an excel spreadsheet except for 1 issue -- the excel table is not properly refreshing (i.e. a row I deleted in oracle still shows up in excel version). How is this happening? I cannot figure out how to get it to reflect the current version of the database without making a new spreadsheet and reconnecting. Even if I clear the table, My refresh data button brings back those rows that don't exist anymore
Also, I want to make a user-friendly way to add or delete rows in oracle via excel spreadsheet. So whatever I do in excel would automatically update in the oracle database. Is this even possible or am I really overreaching?
Does anyone have any ideas or tips? I'm not very technical so please dumb down any responses

What would be the best method for building Dynamic Reports from my SQL DB Data?

I am building a simple database with about 6-7 tables. I will be setting a schedule to do a clean import from a .txt file.
I want to take this data and create a report, like I would do in an excel spreadsheet, convert it to a pdf and post it to our company intranet for those interested to access it.
I'm trying to think of the best way to build my report. Would I just use an excel spreadsheet with a direct connection to the database? Would I create some sort of console application (c/c#/vb/vb.net) that would query the db, generate the report in an excel file, convert to pdf and save?
I'm quite comfortable in these different languages, just not as experienced in the reporting services (although I do have a lot of experience working with EXCEL and VBA Macros) but I want to get into it (SSRS) and get familiar with it as I will be doing a lot of projects like this in the future. This is seems like an easy one to get my hands dirty with and learn and build off of.
Any insight or suggestions would be greatly appreciated.
Thanks so much!
My suggestion:
Create desired SQL queries to retrieve the data in desired form
Link these queries to your Excel sheet, perhaps directly in form of pivot tables for aggregation of results
Using VBA, you can easily create PDF from the data at the click of a button
The initial design will be time intensive, but after that, everything is automated and one just needs to press the button that creates the PDF.
How to link Access queries to your Excel file:
Data --> Get external Data
You can easily refresh all data whenever you open the Excelsheet by using the code below in the On Open event of the workbook:
ThisWorkbook.RefreshAll
If you need further clarification, do not hesitate to ask
If your end goal is to create a PDF that will be out on your intranet then I would create the report in SSRS. Then you can schedule it to run and output a PDF to your network location.
I've had good experiences using a pivot table in Excel which is a connected table to your SQL database.
In the connection parameters in Excel there is a field where you can define your SQL query, whether it be to call a stored procedure or just a simple SELECT statement.
The main reason I prefer a pivot table SQL connection rather than a normal table connection is because if you have a chart that references the connected table, the chart formatting will be reset when you refresh your connection (if you need to updated your report).
If I use a chart that references a pivot table (or a pivot chart) then the formatting is retained.

Hide Committed Data

I facing an issues no to show committed data in my table. For example once user upload data from excel it will display under the table below. Once user click save those data will be committed to database and it won't show again. Any suggestion for resolving this issues?(i am using adf Studio Edition Version 11.1.1.7.0) Thank you very much.
What's the data-model that populates your table? Once you click the commit button you'll need to remove the rows from that data model. So for example if your data model is based on a query - then you will need to find a SQL that doesn't include the rows that are in the table.

How can I change the source of a Data Source View and the Report Models based on it to a different database?

I have a number of reports deployed to a SQL Server 2005 Reporting Services server. They were all developed using the same Report Model (SDML) that references the same Data Source View (DSV) that points to a test database filled with mostly dummy data. Now, I would like to make those reports pull data from the live database with our real data instead. The two databases have exactly the same structure.
It seems to me, that if I could just change the Data Source being referenced in the Data Source View, then I could redeploy the report model, and all the reports based on it would also reference the correct data. I can see in Business Intelligence Development Studio 2005 that there's an option in the Data Source View property list in Design mode to change the Data Source. So I changed the Data Source, thinking that would work. However, when I try to redeploy the report model after changing the Data Source in the Data Source View, I get a number of error messages like this one:
Error 1 The Table property of the Entity 'Address' refers to the Table 'dbo_address', which is not in the primary data source. Events.smdl 0 0
Is there something else I need to be doing here? Something in the Report Model or Data Source View that should be updated? Is there another way to do what I need to?
Edit 1:
I tried changing the datasource of the report model on the server after the reports were deployed, and that seemed to work pretty well. It's not exactly what I wanted to do, but it works. Thanks everyone.
The strategy that has worked best for me is to deploy the "test" shared datasource to the server then edit it via the Report Manager interface to point to the "production" database (changing the connection string). Making sure of course Overwrite Datasources is set to false on deploy.
Also, your database schema must be the same in test as it is in production.
I don't have as much experience with the report models but generally SSRS doesn't like it when you make changes to the datasource and asks you to refresh all the datasets that you have if you do.
Alternatively, just change the datasource definition on the report server itself.
It sounds like you're changing the data source that the dsv references. Instead, why don't you try to change connection string of the data source. Internally the DSV uses GUIDs to identify the various tables and fields, I suspect that by creating a new data source the GUIDs will change and that is why you're seeing these error messages (as the error message is mapping the internally used GUID to it's "friendly name").
The setup I use has an identically named Data Source (.rds) file for each environment, in the same folder the reports are deployed to. It's just a connection string...
My experience has been the same as zalzaw's - if you change the Data Source, you have to refresh all the datasets associated with the report while pointing at the new environment based on the data source changes. It's very tedious - you go to the Data tab for the report in Business Intelligence Development Studio 2005:
Select a Dataset from the dropdown menu
Click the Refresh button (2nd to the right of the Dataset dropdown, icon looks like recycle)
Repeat steps until all datasets have been refreshed.
Make sure that the database(s) (and stored procedures) are in sync. It's all for naught if a table exists in Dev but not in Test or Prod...

Resources