Search found 171 matches

by JORGEMAL
Mon 12 Aug 2019 22:53
Forum: dotConnect for PostgreSQL
Topic: How to deal with 2 versions of dotConnect
Replies: 5
Views: 5149

Re: How to deal with 2 versions of dotConnect

Hi,

This is an old post that talks about working with 2 versions of dotConnect for PostgreSQL.

Is the answer still valid for the development side for recent versions?
"We do not recommend to install several versions of dotConnect for PostgreSQL in the development environment because design time will not work correctly in this situation."

My question is focused on ASP.NET MVC and Core 2.x.

Best regards,
Jorge Maldonado
by JORGEMAL
Tue 30 Jul 2019 15:27
Forum: dotConnect for PostgreSQL
Topic: Identity support for .NET Core
Replies: 1
Views: 4936

Identity support for .NET Core

Hello,

a) Reading the ASP.NET-Specific Features section in the documentation, I see that ASP.NET Core Identity implementation is included only for Entity Framework Core. I do not use Entity Framework in my projects. Is there a "standalone" implementation of ASP.NET Core Identity, one that does not require EF?

b) I took a look at dotConnect for PostgreSQL Framework Compatibility and I see that .NET Core 2.x is supported and I suppose that v2.2 is included. Is this correct?

Best regards,
Jorge Maldonado
by JORGEMAL
Wed 12 Dec 2018 05:23
Forum: dotConnect for PostgreSQL
Topic: PostgreSQL 11 support
Replies: 2
Views: 1613

PostgreSQL 11 support

Hi,

When will PostgreSQL 11 support be available?

Best regards,
Jorge Maldonado
by JORGEMAL
Sat 28 Apr 2018 21:36
Forum: dotConnect for PostgreSQL
Topic: Unable to produce licensing
Replies: 5
Views: 2184

Re: Unable to produce licensing

I decided to upgrade to the latest version of dotConnect for PostgreSQL (7.10.1115). When I run the "Tools > PostgreSQL > License information..." option I am asked to "specify which executables are allowed to use the class library". What should I add here? My project is a regular MVC application, not a MVC Core.

Thank you.
by JORGEMAL
Wed 25 Apr 2018 16:33
Forum: dotConnect for PostgreSQL
Topic: Unable to produce licensing
Replies: 5
Views: 2184

Re: Unable to produce licensing

dotConnect for PostgreSQL version: 7.4.616.5 although we plan to upgrade when once we update PostgreSQL to version 10. But for now it is fine.
dotConnect for PostgreSQL was already installed when Visual Studio 2017 was installed. No re-installation has been done since the original installation.

Regards.
by JORGEMAL
Tue 24 Apr 2018 18:01
Forum: dotConnect for PostgreSQL
Topic: Unable to produce licensing
Replies: 5
Views: 2184

Unable to produce licensing

Recently, I installed VS2017 and developed my first ASP.NET MVC (just MVC not Core) project and published it to a web server for testing. I do not have the DotConnect Wizard in "Tools/PostgreSQL/License Information" available in VS2017 (only in VS2015 that I also have). I have read instructions here (https://www.devart.com/dotconnect/postg ... nsing.html) but I have not been able to fix my issue. I created the "licenses.licx" file and added the line "Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql" but it seems nothing happens when compiling my MVC project. I also right-click the "licenses.licx" file in Solution Explorer but I do not see the "Build Runtime Licenses" options.I checked the file properties and it is an "embedded resource".

I would like to get the DotConnect Wizard available in VS2017. How can I achieve that?

Regards.
by JORGEMAL
Fri 27 Oct 2017 01:53
Forum: dotConnect for PostgreSQL
Topic: Casting PgSqlDataReader to List<T>
Replies: 1
Views: 1210

Casting PgSqlDataReader to List<T>

I am planning to migrate a web forms project to MVC. In web forms I usually save the result of a SELECT statement in a PgSqlDataReader. What I want is to "cast" PgSqlDataReader to List<T>. One way to do it is to iterate the reader and add items to the list. Is there a "direct" way to perform such a casting?
by JORGEMAL
Thu 01 Sep 2016 23:21
Forum: dotConnect for PostgreSQL
Topic: TImestamp with milliseconds or ten thousandths of a second
Replies: 1
Views: 1375

TImestamp with milliseconds or ten thousandths of a second

I am using PostgreSQL and dotConnect for PostgreSQL to develop an application in .NET where I use a timestamp field. Actually, I am inserting records with the format ToString("yyyy/MM/dd HH:mm:ss"). Is it possible to specify milliseconds or ten thousandths of a second?

According to Microsoft documentation (https://msdn.microsoft.com/en-us/librar ... .110).aspx) I am trying ToString("yyyy/MM/dd HH:mm:ss.fff") for milliseconds and ToString("yyyy/MM/dd HH:mm:ss.ffff") for ten thousandths of a second but I get an error saying that syntax is not valid. However, the format ToString("yyyy/MM/dd HH:mm:ss") works pefectly well.

Regards.
by JORGEMAL
Wed 21 Jan 2015 00:59
Forum: dotConnect for PostgreSQL
Topic: How to get the providerUserKey to create a user if I have 2 membership providers
Replies: 1
Views: 1900

How to get the providerUserKey to create a user if I have 2 membership providers

I wonder if this post belongs to this forum. Please let me know if I should ask somewhere else.

I need to use 2 different Membership providers in my web application so I have set both of them in the web.config file. The 2 of them are based on Devart for PostgreSQL with the only difference that they need a different connection string each one. I see that, to create a new user with this approach, I need to issue the following command in code:

Code: Select all

Membership.Providers["nameOfProvider"].CreateUser(string UserName, string Password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
How do I get the providerUserKey "before" creating the user?

I found the information in the link below but I just do not get the idea, however I see that in my case it is related to the MembershipProvider, that is why I think that you can help.
https://msdn.microsoft.com/en-us/librar ... .110).aspx
by JORGEMAL
Wed 14 Jan 2015 16:36
Forum: dotConnect for PostgreSQL
Topic: Overriding MembershipProvider and RoleProvider Initialize method
Replies: 3
Views: 1665

Re: Overriding MembershipProvider and RoleProvider Initialize method

Thanks for your reply.
Because I want to connect to several databases (all of them with exactly the same schema) from my web application (depending upon the business I want to manage), every DB has its own set of roles and login roles. From this, I understand that I need to re-initialize the PgSqlMembershipProvider and PgSqlRoleProvider definition (DB connection string for example) in order to get access to membership tables of other business that we maintain. This issue requires me to re-Initialize both providers (membership and role).

Is my approach correct? I want to make sure I am taking the right direction.

Respectfully,
Jorge Maldonado
by JORGEMAL
Wed 07 Jan 2015 02:49
Forum: dotConnect for PostgreSQL
Topic: Overriding MembershipProvider and RoleProvider Initialize method
Replies: 3
Views: 1665

Overriding MembershipProvider and RoleProvider Initialize method

I am overriding the Initialize method of PgSqlMembershipProvider and PgSqlRoleProvider because our web application connects to different databases with the same schema. For this, I have 2 classes that inherit from PgSqlMembershipProvider and from PgSqlRoleProvider. How does the Initialize method work? When is it executed? How can I execute it on-demand so I can re-define the connection string in order to modify the database?

In the code below, the method "Utilerias.ObtenerConnString" returns a new connection string which includes a database depending on a certain criteria.

Code: Select all

public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
    {
        String strConn = Utilerias.ObtenerConnString();
        base.Initialize(name, config);
        base.connectionString = strConn;
    }
Respectfully,
Jorge Maldonado
by JORGEMAL
Thu 21 Aug 2014 19:16
Forum: dotConnect for PostgreSQL
Topic: How to assign NULL value to fields in a table in code
Replies: 1
Views: 1266

How to assign NULL value to fields in a table in code

How can I assign NULL values to the following fields in the code below:
dfe_fraccion, dfe_unidad_comercial, dfe_unidad_tarifa and dfe_unidad_cove. Please note that 2 fields are string and 2 are integer.

Code: Select all

public void Inserta(ref String strMensaje, String strOrigen)
{
    //Definicion el Query
    StringBuilder strQuery = new StringBuilder();
    strQuery.Append("INSERT INTO detalle_facturas_exportacion (");
    strQuery.Append("dfe_id_factura, ");
    strQuery.Append("dfe_id_parte, ");
    strQuery.Append("dfe_cantidad, ");
    strQuery.Append("dfe_precio_unitario, ");
    strQuery.Append("dfe_fraccion, ");
    strQuery.Append("dfe_unidad_comercial, ");
    strQuery.Append("dfe_unidad_tarifa, ");
    strQuery.Append("dfe_factor_conversion, ");
    strQuery.Append("dfe_unidad_cove, ");
    strQuery.Append("dfe_factor_cove, ");
    strQuery.Append("dfe_numero_orden "); ;
    strQuery.Append(") VALUES (");
    strQuery.Append(":prmIdFactura, ");
    strQuery.Append(":prmIdParte, ");
    strQuery.Append(":prmCantidad, ");
    strQuery.Append(":prmPrecioUnitario, ");
    strQuery.Append(":prmFraccion, ");
    strQuery.Append(":prmUnidadComercial, ");
    strQuery.Append(":prmUnidadTarifa, ");
    strQuery.Append(":prmFactorConversion, ");
    strQuery.Append(":prmUnidadCove, ");
    strQuery.Append(":prmFactorCove, ");
    strQuery.Append(":prmNumeroOrden ) ");

    //Definicion de la conexion.
    String strConnAux = Herramientas.Herramientas.ObtenerStringConexion();
    String strConn = System.Configuration.ConfigurationManager.ConnectionStrings[strConnAux].ToString();
    PgSqlConnection pgConn = new PgSqlConnection(strConn);
    PgSqlCommand pgCmd = new PgSqlCommand(strQuery.ToString(), pgConn);
    pgCmd.Parameters.Add("prmIdFactura", PgSqlType.Int).Value = this.IdFactura;
    pgCmd.Parameters.Add("prmIdParte", PgSqlType.Int).Value = this.IdParte;
    pgCmd.Parameters.Add("prmCantidad", PgSqlType.Numeric).Value = this.Cantidad;
    pgCmd.Parameters.Add("prmPrecioUnitario", PgSqlType.Numeric).Value = this.PrecioUnitario;
    pgCmd.Parameters.Add("prmFraccion", PgSqlType.VarChar).Value = this.Fraccion;
    pgCmd.Parameters.Add("prmUnidadComercial", PgSqlType.Int).Value = this.UnidadComercial;
    pgCmd.Parameters.Add("prmUnidadTarifa", PgSqlType.Int).Value = this.UnidadTarifa;
    pgCmd.Parameters.Add("prmFactorConversion", PgSqlType.Numeric).Value = this.FactorConversion;
    pgCmd.Parameters.Add(":prmUnidadCove", PgSqlType.VarChar).Value = this.UnidadCove;
    pgCmd.Parameters.Add(":prmFactorCove", PgSqlType.Numeric).Value = this.FactorCove;
    pgCmd.Parameters.Add(":prmNumeroOrden", PgSqlType.Int).Value = this.NoOrden;


    pgConn.Open();
    pgCmd.ExecuteNonQuery();
    pgConn.Close();
by JORGEMAL
Mon 21 Jul 2014 14:40
Forum: dotConnect Universal
Topic: How to access a Visual Fox Pro 8 database
Replies: 3
Views: 2642

Re: How to access a Visual Fox Pro 8 database

I installed dotConnect Universal Standard but nothing is shown in the Toolbox. Are there any Devart visual elements for web forms? I guess not in the case of the standard version because there are no ADO.NET providers included. Let me know if I am correct.

What should I take into account in order to establish a connection to a VFP database? If I run the code below I get a message saying " Unknown provider: vfpoledb" and I already downloaded and installed it from here (http://www.microsoft.com/en-us/download ... x?id=32602). I will very much appreciate any help.

Code: Select all

protected void Page_Load(object sender, EventArgs e)
    {
        String strMensaje = "";
        String strConnString = @"Provider=vfpoledb;Data Source=z:\DatosCtes\dbadmctes.dbc;Collating Sequence=machine;";
        String strCommand = "SELECT * FROM catctes";

        UniConnection objConn = new UniConnection(strConnString);
        UniCommand objCommand = new UniCommand(strCommand, objConn);
        objConn.Open();
        UniDataReader drInfo;
        
        try 
        { 
            drInfo = objCommand.ExecuteReader();
            grdPrueba.DataSource = "drInfo";
        }
        catch (Exception objException)
        {
            strMensaje += objException.Message + "\n";
            strMensaje += objException.StackTrace + "\n";
        }
        
        objConn.Close();
    }
Best regards,
Jorge Maldonado
by JORGEMAL
Fri 18 Jul 2014 14:58
Forum: dotConnect Universal
Topic: How to access a Visual Fox Pro 8 database
Replies: 3
Views: 2642

How to access a Visual Fox Pro 8 database

I need to access an old Visual Fox Pro 8 database from our application which was developed with Visual Studio 2013 and dotConnect for PostgreSQL and I know I can use ODBC or OLE DB. Will dotConnect Universal help me achieve my goal? If so, please explain.

Respectfully,
Jorge Maldonado
by JORGEMAL
Thu 30 Jan 2014 15:53
Forum: dotConnect for PostgreSQL
Topic: Selecting information from 2 DB´s
Replies: 1
Views: 1045

Selecting information from 2 DB´s

Is it possible to perform a select statement to retrieve data from 2 databases located in 2 different servers and get the result in, let´s say, one DataReader or one DataTable?

One approach for getting the information into a DataTable is to perform 2 selects, fill 2 different DataTables and, finally, do a DataTable merge. However, I am interested in knowing if there is an approach to do all this in only one step, with one query, one pgsqlConnection, one pgsqlCommand.

Respectfully,
Jorge Maldonado