romny's profileTecnologias de la Inform...PhotosBlogListsMore Tools Help

Blog


    February 11

    Conectando C# con PostgreSql

    Hola, como están, este post es raro, no acostumbro ah vincularme con otros tecnologías si no estoy trabajando en ellas, pero un amigo me pregunto de como trabajar C# con PostgreSql, como sabes PostgreSql es un servidor de base de datos orientada a objetos cuya procedencia es de software libre.

    Investigando encontré un proveedor de datos para .NET llamado Npgsql, ya que como sabrán, no está dentro de los proveedores de datos predefinidos en .NET. Este proveedor funciona para versiones 7. Xxx de PostgreSql y posteriores. Tambien me descargue el PostgreSql 8.3.

    Despues de instalar el servidor de PostgreSql, se comienza a ver las diferencias con Sql Server, ya que este servidor se ejecuta en el puerto 5432.

    Lo primero es vincular las librerías correspondientes al poryecto.

    p2

    Despues es vincular los namespace al proyecto.

    using Npgsql;

    using NpgsqlTypes;

    using Npgsql.Design;

     

    Despues de crear una pequeña BD y de crear  una tabla con unos daticos. se hace la conexion y se prueba.

    p1

    y hace queda la aplicacion

    p3

     y aqui esta la demo.

    Bueno espero les guste.

    Romny Duarte

    Comments (2)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Oct. 20
    No namewrote:

    Hi,Do you have used LCDs, used flat screens and secondhand LCDs? Please go here:www.sstar-hk.com(Southern Stars).We are constantly buying re-usable LCD panels and working for LCD recycling.The re-usable panels go through strictly designed process of categorizing, checking, testing, repairing and refurbishing before they are re-used to make remanufactured LCD displays and TV sets.Due to our recent breakthrough in testing and repairing technology of LCD, we can improve the value for your LCD panels.

    Contact Us

    E-mail:sstar@netvigator.com
    website:www.sstar-hk.com

    Sept. 11

    Trackbacks

    The trackback URL for this entry is:
    http://genobraker.spaces.live.com/blog/cns!F45E3DFD1A71CD5A!842.trak
    Weblogs that reference this entry
    • None