×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

ADO connection string for Mimer ODBC?
2

ADO connection string for Mimer ODBC?

ADO connection string for Mimer ODBC?

(OP)
What is the connection string when accessing to a Mimer data source (ODBC) in VB.

This is from VB help sample:

Public Sub ConnectionStringX()

   Dim cnn1 As ADODB.Connection
   Dim cnn2 As ADODB.Connection
   Dim cnn3 As ADODB.Connection
   Dim cnn4 As ADODB.Connection

   ' Open a connection without using a Data Source Name (DSN).
   Set cnn1 = New ADODB.Connection
   cnn1.ConnectionString = "driver={SQL Server};" & _
      "server=bigsmile;uid=sa;pwd=pwd;database=pubs"
   cnn1.ConnectionTimeout = 30
   cnn1.Open
   
   ' Open a connection using a DSN and ODBC tags.
   Set cnn2 = New ADODB.Connection
   cnn2.ConnectionString = "DSN=Pubs;UID=sa;PWD=pwd;"
   cnn2.Open
   
   ' Open a connection using a DSN and OLE DB tags.
   Set cnn3 = New ADODB.Connection
   cnn3.ConnectionString = "Data Source=Pubs;User ID=sa;Password=pwd;"
   cnn3.Open
   
   ' Open a connection using a DSN and individual
   ' arguments instead of a connection string.
   Set cnn4 = New ADODB.Connection
   cnn4.Open "Pubs", "sa", "pwd"
 
   ' Display the state of the connections.
   MsgBox "cnn1 state: " & GetState(cnn1.State) & vbCr & _
      "cnn2 state: " & GetState(cnn2.State) & vbCr & _
      "cnn3 state: " & GetState(cnn3.State) & vbCr & _
      "cnn4 state: " & GetState(cnn4.State)

   cnn4.Close
   cnn3.Close
   cnn2.Close
   cnn1.Close

End Sub


RE: ADO connection string for Mimer ODBC?

The connection string with Mimer throw ODBC should be something like this:

"Provider=MSDASQL.1;Persist Security=False;User ID=xxx;Data Source=yyy"

Where data source is the name you set up in Control Panel -> Administrative Tools -> Data Source for Mimer.

RE: ADO connection string for Mimer ODBC?

I have problems to create stored procedures in mimer 8.2
can somebody show me an easy example?

RE: ADO connection string for Mimer ODBC?

(OP)
The problem with stored procedures is that the utility QBE does not support entering a "create function" command.

I installed the utility WSQL with basically is the same thing as QBE but developed by another group.

In WSQL there is a button "E" where you can enter PSM code.

I entered the code:

create function square(xx integer) returns integer
begin
  return xx * xx;
end

and pressed run.

Then to test it a wrote a question:

select invoiceid,
       square(invoiceid)
from   invoices
where  invoiceid < 20;

and it worked.

I dont know how to make it work in QBE or BatchSQL.

RE: ADO connection string for Mimer ODBC?

(OP)
In QBE its possible to run a "create function/procedure" in this way:

write the code, for example:

create function add1(y integer)
returns integer
begin
  return y + 1;
end

mark the whole statement and click "Run as single statement" in Run menu.

Still dont know how to do it in BatchSQL.

RE: ADO connection string for Mimer ODBC?

In Batch SQL you create a procedure/function by starting with an at-sign @ on a single line as follows:

SQL>@
  1@create function add1(y integer)
  2@returns integer
  3@begin
  4@   return y + 1;
  5@end
  6@@
SQL>

The program then prompts with linenumber@. To finish off, enter @ alone on a line (input is shown in boldface above, i.e. SQL> is the batch sql prompt).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close