Include devart on published VB application

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
skarosg3
Posts: 7
Joined: Tue 18 Feb 2014 09:53

Include devart on published VB application

Post by skarosg3 » Wed 30 Apr 2014 06:11

Hi all,
I am creating an application using VB express 2010, and now that i am getting near the end i try to see how it works on other computers than the one i am coding it on.
It seems that i need to manually install devart on each machine i am going to use my application. Is there a way to add the devart installer to the application installer?

Thanks, ilias

Also, is there a way to execute multiple insert commands? When the Command String is consist of multiple sql commands seperated by a ; i get an error, saying that i cant have muliple commands

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Include devart on published VB application

Post by Pinturiccio » Wed 30 Apr 2014 15:09

skarosg3 wrote:It seems that i need to manually install devart on each machine i am going to use my application.
You can install dotConnect for PostgreSQL with the "Minimal installation" setting and it solves some issues but it is not necessary.

It's enough to perform the following actions:
1. Create a license resource for your application. dotConnect for PostgreSQL includes License Wizard that helps you configure license information. To invoke the wizard, choose PostgreSQL | License Information from the Visual Studio Tools menu. Then click the Fix button in the dialog box and follow the wizard's instructions. For more information, please refer to http://www.devart.com/dotconnect/postgr ... nsing.html

2. If you use ASP.NET providers, you need to add the information about the provider to the web.config file. For more information, please refer to
http://www.devart.com/dotconnect/postgr ... iders.html
http://www.devart.com/dotconnect/postgr ... orial.html

3. If you use dotConnect for PostgreSQL via a factory-based class then you have to add the DbProviderFactories section of the your application config file or in machine.config file;

4. You need to deploy the Devart assemblies that are used by your application together with it;

5. If you use other dotConnect for PostgreSQL features, for example Entity Framework, LinqConnect, or other, you may need to perform some additional actions. For more information, please refer to http://www.devart.com/dotconnect/postgr ... yment.html
skarosg3 wrote:Also, is there a way to execute multiple insert commands? When the Command String is consist of multiple sql commands seperated by a ; i get an error, saying that i cant have muliple commands
PgSqlCommand class is intended to execute a single statement. You can use PgSqlScript, which allows you to execute several SQL statements one by one. For more information please refer to: http://www.devart.com/dotconnect/postgr ... cript.html

skarosg3
Posts: 7
Joined: Tue 18 Feb 2014 09:53

Re: Include devart on published VB application

Post by skarosg3 » Mon 12 May 2014 08:29

Pinturiccio wrote: You can install dotConnect for PostgreSQL with the "Minimal installation" setting and it solves some issues but it is not necessary.

It's enough to perform the following actions:
1. Create a license resource for your application. dotConnect for PostgreSQL includes License Wizard that helps you configure license information. To invoke the wizard, choose PostgreSQL | License Information from the Visual Studio Tools menu. Then click the Fix button in the dialog box and follow the wizard's instructions. For more information, please refer to http://www.devart.com/dotconnect/postgr ... nsing.html

2. If you use ASP.NET providers, you need to add the information about the provider to the web.config file. For more information, please refer to
http://www.devart.com/dotconnect/postgr ... iders.html
http://www.devart.com/dotconnect/postgr ... orial.html

3. If you use dotConnect for PostgreSQL via a factory-based class then you have to add the DbProviderFactories section of the your application config file or in machine.config file;

4. You need to deploy the Devart assemblies that are used by your application together with it;

5. If you use other dotConnect for PostgreSQL features, for example Entity Framework, LinqConnect, or other, you may need to perform some additional actions. For more information, please refer to http://www.devart.com/dotconnect/postgr ... yment.html
Thanks for the info!
Got it working.
Pinturiccio wrote:
skarosg3 wrote:Also, is there a way to execute multiple insert commands? When the Command String is consist of multiple sql commands seperated by a ; i get an error, saying that i cant have muliple commands
PgSqlCommand class is intended to execute a single statement. You can use PgSqlScript, which allows you to execute several SQL statements one by one. For more information please refer to: http://www.devart.com/dotconnect/postgr ... cript.html
I am trying to do this, but i am getting this error

Code: Select all

Error	1	Type 'Devart.Data.PostgreSql.PgSqlScript' is not defined.	C:\Documents and Settings\Administrator\Τα έγγραφά μου\ilias\PEAccess\PEAccess\backUp.vb	71	35	PEAccess
on this

Code: Select all

 Friend WithEvents pgScript As Devart.Data.PostgreSql.PgSqlScript
i do import devart
Imports Devart.Data.PostgreSql,
but still sqlscript is not found!

skarosg3
Posts: 7
Joined: Tue 18 Feb 2014 09:53

Re: Include devart on published VB application

Post by skarosg3 » Mon 12 May 2014 10:59

I finally used this:
cmd.UnpreparedExecute = True

and it works just fine!

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Include devart on published VB application

Post by Pinturiccio » Mon 12 May 2014 13:30

Probably you use dotConnect for PostgreSQL Express edition. PgSqlScript is not available in dotConnect for PostgreSQL Express edition. For more information, please refer to http://www.devart.com/dotconnect/postgr ... tions.html
skarosg3 wrote:I finally used this:
cmd.UnpreparedExecute = True

and it works just fine!
If you set the UnpreparedExecute property to true, queries are sent to the server using the 'simple query' sub-protocol. Multiple queries can be used with this protocol, but commands will not be prepared, and parameter values are sent as literals. For more information, please refer to http://www.devart.com/dotconnect/postgr ... ecute.html

Post Reply