How to insert to database using silverlight Dataset - database

How can I enter dataset into the database using data
An example please

You can't access a database directly from a Silverlight client. There are several ways to accomplish this but you basically need to call a web service from Silverlight. See the following article for a step by step example: https://technet.microsoft.com/en-us/library/cc197937(VS.95).aspx

Related

Best approach to get notifications from database when table record changing in asp.net core web api

I'm working with asp.net-core 2.2 web api project with angular 7. In this I want to get notifications when a record inserting or updating in specific table. I read many of articles on it with sqldependancy class. But none of them didn't give me any satisfied answer. The thing I want to know is, are there any best approaches to do this work with another way. And if the best approach is,using sqldependecy how to combine it with EntityFramework core?
You could create an AFTER UPDATE TRIGGER on the table. Depending on how you want to get notified (SQL Mail for example) you could then code for it.
(on a personal note, I hate triggers but this is another way to do it)

What is the best way to copy and compare data received from Web API request to SQL Server database?

There is a requirement in my project where we need to design a system which can collect data through Web API and then use the data to compare and copy the received data to an existing SQL Server DB. I want to know if anyone has already worked on such requirement and if yes then what is the best way to design it? I am currently thinking of below two options. Please let me know which one is better and if there is any other option.
My algorithm will be as - fetch the data through web api -> compare the data -> save mismatched data to a particular table -> copy new data to the existing tables.
The two options I am currently thinking of are-
1) Use a windows service which will run once in a day and execute above algo.
2) Use SSIS package which will run once in a day and execute above algo.
If anyone has used either of this solution, please guide me to an article or blog which can be helpful to me.
I have similar project requirement before. What I achieved is in SSIS.
Brief steps:
Using C# script to get the return data (http://json2csharp.com/ is an easy way to return C# class based on your JSON components)
using third party dll, install Newtonsoft.Json to deserialize the JSON
Assign the results in C# script to each pre defined variable (be careful with the data type)
Compare the result with the existing table in data flow task.
Let me know if you have any questions

How to use a web service as a datasource in Spotfire

There is a use case in which we would like to add columns from the data of a webservice to our original sql data table.
If anybody has done that then pls do comment.
Shadowfax is correct that you should review the How to Ask guide.
that said, Spotfire offers this feature in two ways:
use IronPython scripting attached to an action control to retrieve the data. this is a very rigid solution that offers no caching, and the data must be retrieved and placed in memory each time the document is opened. I'll leave you to the search feature here on SO; I've posted a sample document somewhere.
the ideal solution is to use a separate product called Spotfire Advanced Data Services. this data federation layer can mashup data and perform advanced, custom caching based on your needs. the data is then exposed as an information link in Spotfire Server. you'll need to talk to your TIBCO sales rep about this.
I would use a Web Server to consume the Web Service and write it to your DB.
But here is the hard way:
Step 1: Use IronPython Script to retrieve WS Data, and form a Data Table or Document Property (https://www.tibco.com/blog/2014/03/03/streaming-xml-and-json-data-from-the-web-directly-into-spotfire-clients-using-script-controls/)
Step 2: Write a Stored Procedure in your DB and use IronPython to call the procedure (using a button, so this will be a manual step) and pass the Data Table or Document Property as parameter. (Here is an ironpython alternative: http://spotfired.blogspot.com/2014/04/write-back-to-database-from-spotfire.html)

Newbie looking for simple example of connecting to SQL using asp.net MVC with VB.net

So I am looking to freshen up my dev skills. I come from a classic ASP background using VB, so this new .net and Model concept is very foreign to me. I cant seem to get my head wrapped around it yet. I have tried going through the tutorials, but most are C# and I plan to use VB.net.
My needs at the moment are very simple (or at least i thought they were) Does anyone have a simple example or explanation of how I can create a simple page that pulls data from a local SQL Express DB?
I understand how the Controllers and Views work(mostly), but the Models just make zero sense to me
I created a new Model for a very simple database called Test. It has only 5 columns. (Username, Password, Email_Address, Text_number, and UserID (UID). It created a Model1.edmx, but that's it. Nothing else below it. Where the heck do I go from here?
Uggghhh I feel so dumb!! I used to be OK at this, now it's SOOO different!! I miss my T-SQL, Recordsets, and Loops.
If you want db first you should create a new .edmx Model using "generate from database".
When you have created an .edmx model then you usually create your Entity Classes (see tutorials below) with the "add code generation item". You can read about this in one of the linked tutorials, under "Generating Strongly Typed Entity Classes". After that you're ready to go the controller and create your first query to return some data.
I suggest you start watching these free tutorials about MVC3/4, even if they are in C# and you want to use vb.net, I'm sure you can easily understand what's going on since it's clearly explained
http://www.asp.net/mvc/pluralsight
also read these tutorials that show database first approaches
http://msdn.microsoft.com/en-US/data/jj206878
http://msdn.microsoft.com/en-us/data/gg685489.aspx - VB.net project
To connect to your database, you might want to consider an ORM, like one of the following:
Entity Framework
NHibernate
Linq2Sql (built-in/already installed)
Each of these are very popular and make it easy to quickly snap a code-wrapper around your DB. Then, in your model, you use the ORM objects(wrapping your DB) to call through to the DB.

Attach File into Access database using Classic ASP

I have a form which contain some textfields and one attachment(type="file"). I am using MS Access 2010. When i am trying to insert form data into database i am getting error like An INSERT INTO query cannot contain a multi-valued field.I tried a lot and searched a lot but i couldn't figure out. I am able to do it using asp.net. But, My server supports only classical asp. Can anyone have any idea about this.
I don't believe you can make use of an MS Access attachment field using ADO. I believe you need to use DAO or ADO.Net. And I don't think DAO or ADO.net are available in Classic ASP.
Edit: I agree with Hansup, that you might be able to use DAO in VBScrip/Classic ASP but I'm finding it very difficult to find any information or examples. Here's a list of constants but this is for an older version of DAO. http://include.wutils.com/com-dll/constants/constants-DAO.htm

Resources