Problem with SqlClient - InfoPath Dev
in

InfoPath Dev

Problem with SqlClient

Last post 07-17-2007 09:58 AM by hguevara. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 08-09-2006 02:39 AM

    • angie
    • Not Ranked
    • Joined on 08-09-2006
    • Malaysia
    • Posts 4

    Problem with SqlClient

    I'm using InfoPath 2007. I try to retrieve the records from SQL server and update the form's field but system prompt the following error when execute the code "MyConnection.Open();"

    System.Security.SecurityException
    Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
    at System.Security.PermissionSet.Demand()
    at System.Data.Common.DbConnectionOptions.DemandPermission()
    at System.Data.SqlClient.SqlConnection.PermissionDemand()
    at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
    at System.Data.SqlClient.SqlConnection.Open()
    at StaffAbsenceRequestForm.FormCode.CTRL39_5_Clicked(Object sender, ClickedEventArgs e)
    at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
    at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)

    Please advice and suggest the solution.

    Thank you.

    Regards,
    -angie-
  • 05-05-2007 08:45 PM In reply to

    Hi angie,

    Your solution will have to be Full Trust in order to use SqlClient.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-16-2007 07:12 AM In reply to

    Hola q tal a todos
    soy principante en lo q respecta a infopath
    el problema q tengo es al conectarme a un archivo de base de datos.
    en .net
    no se si alguien tenga info.
    sobre esto.

    lo que busco hacer es guardar los datos a una base de datos una vez que se aya llenado el formulario.
    de antemano.
    lo que busco tambien es hacer consultas ya sean select's programando.

    GRACIAS
    de antemano
  • 07-16-2007 09:50 AM In reply to

    problemas al usar ADOAdapter.

    no me reconoce la referencia?

     

  • 07-17-2007 09:26 AM In reply to

    ¡Hola hguevara y bienvenidos a el foro!

    ¿Podrías describir tu problema poco más?  Necesitamos ver a el código o el mensaje de error para ayudarle. 

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-17-2007 09:30 AM In reply to

    Además, ahora tenemos un foro para la gente español http://www.infopathdev.com/forums/84/ShowForum.aspx

    ¡Vaya a verlo!

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 07-17-2007 09:58 AM In reply to

    hola,
    soy algo principiante en infopath
    se lo basico,lo que hasta ahora busco
    es algun codigo que me ayude a poder utilizar
    un INSERT,un UPDATE, un DELETE,
    estoy utilizando SQLSERVER.

    e podido leer algO de:

    http://www.infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353

    pero tengo problemas para la referencia
    a Microsoft.Office.Interop.InfoPath.SemiTrust.

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.