Results 1 to 4 of 4

Thread: command builder and stored procedure

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    command builder and stored procedure

    Hi,

    i am returning a dataset by using a dataadapter and a command object that uses a stored procedure. I was wondering if it is possible to use a command builder to perform updates with the data adapter because of the stored procedure? When i try i get an error. Is it because the command builder can't build an update command because of the stored procedure?

    Many thanks
    Nick
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    system.data.sqlClient.sqlException : Line1 :incorrect syntax near 'Name'

    - this is the error i get when trying to do myDataAdapter.update(myDataset, "policy")
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  3. #3
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Post some more code

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    ah ha i know what it is!

    i have a field in my database table called [first name] (i didn't design the database unfortunately!!!)

    the command builder can't cope with putting '[' around the field names so it falls over! I removed the space from this field name and it seems to have now fallen over on [date of birth] field name so i am gonna have to change them all!
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width