another blog


About Microsoft Dynamics GP :-)

When In Dexterity, do as dexterity developer should do.

I have notice that people usually use SQL statements for doing task which have an equivalent and easy way of doing in dexterity. while browsing through Dynamics community found this particular post. The person who posted the issue is doing the same, using SQL to delete the records from Dexterity form. The disadvantages I found with this method are.

  1. Extra line of code.
  2. Possible issue of SQL_Connect.
  3. Hidden SQL script errors which could only confirm only if we first compile them first on Query Analyzer and then use in our code.
  4. Limitation of text field length which can not be greater than 32,767.
  5. Two many concatenation for larger queries.
  6. Possibilities of error increases, dexterity syntax, SQL syntax errors, Tables and fields reference error and difficult to debug.

As compare to SQL_Execute, dexterity remove from table is best, simple and sweet.

release table table1;
‘Item Number’ of table table1=’Item Number’;
change table table1;
if err()=OKAY then
remove table table1;
end if;

GP will take care of database connectivity and getting the right record to delete from right table. I always avoid using SQL_Execute until unless it is not done by dexterity provided syntax for any kind of table operations.


Filed under: Dexterity Development, ,

One Response

  1. Almas says:

    GPF error on SQL_Execute statement

    Date formatting when using SQL_Execute()

    How to use comment indicators with the SQL_Execute() function in Dexterity in Microsoft Great Plains.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: