Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6072725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:11:30+00:00 2026-05-23T10:11:30+00:00

this some code that i got from expert F# chapter 15. let dataAdapter =

  • 0

this some code that i got from expert F# chapter 15.

let dataAdapter = new SqlDataAdapter()
let buildDataSet conn queryString =
    dataAdapter.SelectCommand <- new SqlCommand(queryString,conn)
    let dataSet = new DataSet()
    let _ = new SqlCommandBuilder(dataAdapter)
    dataAdapter.Fill(dataSet) |> ignore
    dataSet

let dataSet = 
    buildDataSet conn "SELECT * FROM Employees"

if i want to delete data or insert data should i make a new dataSet?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:11:31+00:00Added an answer on May 23, 2026 at 10:11 am

    The idea behind using DataSet for working with data is that the DataSet represents a local in-memory copy of some part of the database. To modify the database, you would modify the data stored in the DataSet (in memory) and then submit the changes to the database using the SqlDataAdapter.

    The snippet you posted uses the Fill method to copy data from database to DataSet. Submitting changes from memory to database (the other direction) is done using the Update method.

    You can find some C# examples in this MSDN article. It shouldn’t be difficult to translate them to F#.

    If you don’t need to keep data in memory, it may be easier to use SqlCommand directly. Using this type, you can create SQL command and immediately execute it on the SQL database (without copying any data to memory). You can find some examples in my recent blog post. The blog shows how to read data using ExecuteReader method, but you can use ExecuteNonQuery method to just run command (without reading any results from the SQL server).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got some code that looks like this: using (DBDataContext dc = new DBDataContext(ConnectionString))
I got some legacy code that has this: <?PHP if(isset($_GET['pagina'])==homepage) { ?> HtmlCode1 <?php
I have some code that effectively does this : File file = new File(C:\\Program
I'm porting some code from lisp, but I got stuck at this part (apparently
I've got some code that: reads from a ReadableByteChannel into a ByteBuffer , takes
I have some code that looks like this: someFunc(value) { switch(value){ case 1: case
I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
So I was writing some code today that basically looks like this: string returnString
Ok, this is a curly one. I'm working on some Delphi code that I
There's some code in our project that looks a bit like this: Private Sub

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.