Resolved How to handle insert to ?

kwhelchel

Well-known member
Joined
Feb 28, 2020
Messages
53
Programming Experience
Beginner
ok I have this json string that needs to have the input fields of the requested data input. I will be storing the imputed vales in a sqlite table to be used. But I am not sure what I am looking at to do this exactly. This info we be used in several places also.
json cred string:
var thisJsonStr = "{\"Credentials\":{\"ApiKey\":\"string (CompactGUID)\",\"MerchantID\":\"string\",\"StoreID\":\"string\",\"Username\":\"string\",\"Password\":\"string\"},\"Start\":\"string (ISO8601)\",\"End\":\"string (ISO8601)\",\"Closeouts\":[\"string (ID)\"],\"ReportID\":[\"string\"]}",
 
If you need to work with JSON then you should do some research on how to work with JSON in C#. There's plenty of information around. It's not especially productive for us to just give you code for this one scenario because you then don't learn anything that will help you in most other scenarios, so you're back to square one every time. The best thing is for you to learn the generalities of working with JSON, apply what you have learned to this particular situation and then ask a specific question if you encounter an issue along the way.

The same goes for data access in general and using SQLite in particular. If you search for information on inserting data into SQLite then you'll find it. That the data came from JSON originally is irrelevant, because you'll already have done the data extraction part. Separating a problem out into its constituent parts and tackling each part in isolation is one of the most important principles in software development: divide and conquer. The smaller the problem, the easier it is to solve. One seemingly insurmountable problem can usually be broken down into several easy problems.

I suggest that you do that and then create a new thread when have a specific question about the process. To have a specific question, you need to understand the process though. Just having a starting point and an ending point is not understanding the process. You need to think about the steps to get from one to the other.
 
Back
Top Bottom