Category: SQL

ADOCommand

This is a detailed description for the used ADOCommand command in the articles Stored Procedures and Navision and ADO in Navision.

ADOCommand

The ADO Command is defined by the automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Command
It is used to execute a query against a database.
Read more »

ADOConnection

Hi !

I have been asked to describe the different ADO commands parameters more explicit. So here are a detailed description for the used ADOconnection command in the articles Stored Procedures and Navision and ADO in Navision.

ADOconnection

ADOconnection is defined by the automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Connection
It is used to create and open a connection to a data source (database).
Read more »

Stored Procedures and Navision

If you are executing a specific SQL query very often, it would be usefully to have it as Stored Procedure on the SQL Server.

Stored Procedures is a collection of SQL statements.

There are 2 ways to create a store procedure:

  1. In the SQL Server Management Studio – you can right click on Stored Procedures and chose to create a new Stored Procedure. It will then create a template for you, which you just have to fill out and execute
  2. The second way is to build a script by yourself

Read more »

ADO in Navision

code-dynamics

With ADO you can execute SQL Scripts and Stored Procedures from Navision.

To use ADO in Navision, you have to use the automation “Microsoft ActiveX Data Objects 2.8 Library”

Lets take a closer on how to make a SQL connection and perform a SQL Query in Navision.

Read more »

ADO.NET

For test purpose I did a little test in C#, where I did use ADO.NET to make a connection to my SQL Server.

The common way to access a database is to do the following:

  1. Open a connection to the Database
  2. Perform the Query using a recordset for the returned data
  3. Extract Data needed and close the recordset
  4. Close the connection

Lets take a close look on how to do it in C# ADO.NET

Read more »

DBREINDEX and INDEXDEFRAG example

If you have to optimize a lot of tables and indexes. You could create a SQL script, which then could be scheduled.

Read more »