locked
How to pull data from SQL server in sharepoint RRS feed

  • Question

  • Hi,

    I need to create a simple aspx form with one textfield 'employeName' and on submit button in Sharepoint, On click of submit button,the textfield data should be inserted into the database column named 'employeName' of table 'EmployeInfo'. How to do this?. I dont want to use infopath 

    Sunday, March 20, 2011 5:44 AM

Answers

  • Moderator Note: NEVER post SP 2010 replies in a pre-SP 2010 forum. (and never propose your own posts as answers). I have deleted your post that was a SP 2010 answer.

    this is what you can do to pull data from SQL into MOSS 2007:

    if you confirgured your shared service provider, you have service called BDC Business Data Catalog, which you can use to read data from sql, but remember in MOSS 2007, this BDC service is offline to sql, which means if it won't insert into SQL as you want it to do.

    because i uses xml to get it's data from so u insert, it will insert into xml and NOT sql

    you will have to use a tool to export the DB from SQL to XML

    Tool name is BDC Meta Man http://www.lightningtools.com/bdc-meta-man/default.aspx

    http://www.lightningtools.com/bdc-meta-man/moss-business-data-catalog-getting-started.aspx

    but i see this is not going to do what you want, so to do, just create an application page to deploy it in the layouts in 12hive and do whatever you want in it.

    it is like asp.net page, but the difference is that it is going to be deployed to sharepoint

    and here is a good link with steps for this http://blogs.msdn.com/b/cjohnson/archive/2006/09/05/740498.aspxour

    Moderator Note 2: NEVER ask people to mark your post as an answer.


    Mai Omar | Senior Solutions Developer | ITEgyptCorp | Email: maio@ITegyptCorp.com | Blog: http://maiomar.itegyptcorp.com




    • Edited by Mike Walsh FIN Sunday, March 20, 2011 2:57 PM Moderator Note 2 about never asking people to mark your post as answer added.
    • Marked as answer by Mike Walsh FIN Monday, March 21, 2011 4:03 PM
    Sunday, March 20, 2011 12:21 PM

All replies

  • Thank you,

     I am new to sharepoint, do you have any link which guides how to do ?, I use visual studio 2008 , MOSS 2007 , SQL server 2005,and  virtual machine

    Sunday, March 20, 2011 10:58 AM
  • Moderator Note: NEVER post SP 2010 replies in a pre-SP 2010 forum. (and never propose your own posts as answers). I have deleted your post that was a SP 2010 answer.

    this is what you can do to pull data from SQL into MOSS 2007:

    if you confirgured your shared service provider, you have service called BDC Business Data Catalog, which you can use to read data from sql, but remember in MOSS 2007, this BDC service is offline to sql, which means if it won't insert into SQL as you want it to do.

    because i uses xml to get it's data from so u insert, it will insert into xml and NOT sql

    you will have to use a tool to export the DB from SQL to XML

    Tool name is BDC Meta Man http://www.lightningtools.com/bdc-meta-man/default.aspx

    http://www.lightningtools.com/bdc-meta-man/moss-business-data-catalog-getting-started.aspx

    but i see this is not going to do what you want, so to do, just create an application page to deploy it in the layouts in 12hive and do whatever you want in it.

    it is like asp.net page, but the difference is that it is going to be deployed to sharepoint

    and here is a good link with steps for this http://blogs.msdn.com/b/cjohnson/archive/2006/09/05/740498.aspxour

    Moderator Note 2: NEVER ask people to mark your post as an answer.


    Mai Omar | Senior Solutions Developer | ITEgyptCorp | Email: maio@ITegyptCorp.com | Blog: http://maiomar.itegyptcorp.com




    • Edited by Mike Walsh FIN Sunday, March 20, 2011 2:57 PM Moderator Note 2 about never asking people to mark your post as answer added.
    • Marked as answer by Mike Walsh FIN Monday, March 21, 2011 4:03 PM
    Sunday, March 20, 2011 12:21 PM
  • http://maiomar.itegyptcorp.com/blog/Lists/Posts/Post.aspx?ID=101

    see this as well, it shows you how to create web part, which you can later add to a page.

    so you have two options: create web part or create application aspx page.


    Mai Omar | Senior Solutions Developer | ITEgyptCorp | Email: maio@ITegyptCorp.com | Blog: http://maiomar.itegyptcorp.com

    Moderator Note: When suggesting a blog item you have written yourself, *say so* - such as "Here is an article I wrote on this + URL".

    • Edited by Mike Walsh FIN Sunday, March 20, 2011 3:01 PM Moderator Note added. Not as bad as the things in the previous post so not bolded.
    Sunday, March 20, 2011 1:05 PM
  • Thanks a lot Mai !!!,

    but i get error when i compile Error 1 The type or namespace name 'ProjectViewControl' could not be found (are you missing a using directive or an assembly reference?) C:\Development\ListDefTest\Projectview\Projectview\Webcontrol.cs 12 187 Projectview

    Sunday, March 20, 2011 4:46 PM
  • send me this app. on mail @ mai_oimar_86@live.com and i will correct it for you and send it back and will tell u what was wrong with it? if this is ok, great, if not. please provide more detials about the error.

    what type of project template u created in visual studio?

    also copy paste here the part of code that causes error

    also check that u r using .net 3.5 and not .net4 from right click on project from solution explorer in visual studio and see ur target framework.


    Mai Omar | Senior Solutions Developer | ITEgyptCorp | Email: maio@ITegyptCorp.com | Blog: http://maiomar.itegyptcorp.com
    Monday, March 21, 2011 12:37 PM
  • Not  a problem Mai, that issue was fixed , now i am able to create a Hello world webpart and show in sharepoint.

     

    Moderator Note: New question removed. Do not ask new questions when the problem in your first post has been solved. Instead start a new thread. Also next time say *HOW* the problem was solved not just that it was.

    • Edited by Mike Walsh FIN Monday, March 21, 2011 4:03 PM Moderator Note added about not asking a new question in a thread where the first question has been answered.
    Monday, March 21, 2011 1:41 PM