Call stored procedure from harbour

228 views
Skip to first unread message

Pedro MT

unread,
Sep 24, 2014, 4:01:42 PM9/24/14
to harbou...@googlegroups.com
Hi,

Some example of how to execute a stored procedure in SQL Server (microsoft)?

bye!
Pedro
pe...@lawebdepedro.com.ar
*A medida que conocemos el verdadero amor, nos convertimos en amor.

Usando The Bat! v5.4 en Windows XP 5.1 Build 2600 Service Pack 3
============================================================
The Bat! El MEJOR cliente de e-mail!
Bajelo de http://www.ritlabs.com/the_bat/

Fred Philip

unread,
Sep 25, 2014, 8:26:25 AM9/25/14
to harbou...@googlegroups.com, pe...@lawebdepedro.com.ar
Hi Pedro,
 
are you by chance using Mediator as middleware to SQL server?
(Mediator is offering the interface to execute functions and procedures on the database)
 
Cheers
Fred

Pedro MT

unread,
Sep 25, 2014, 8:52:43 AM9/25/14
to Fred Philip, harbou...@googlegroups.com
Hola Fred!

> Hi Pedro,
>
> are you by chance using Mediator as middleware to SQL server?
> (Mediator is offering the interface to execute functions and procedures on the database)
>
> Cheers
> Fred

Just I have a system that uses the mediator. But I have problems with a SP that is cut in half.
When I run the SP from the Enterprise Manager, it works correctly. After much research, I came
to the conclusion that it is a problem with the Mediator.

That SP calls another SP inside that updates indexes of Mediator, and that's where an error
could not be detected because they produce well.

It is a very rare problem. I call the SP from the harbour system was functioning for 3 months
and suddenly stopped working. One issue that is not minor, is that the tables are modified,
have millions of records.

Salu2!!!
Pedro
pe...@lawebdepedro.com.ar
*En la vida no hay premios ni castigos, solo consecuencias.

Massimo Belgrano

unread,
Sep 25, 2014, 12:07:03 PM9/25/14
to harbou...@googlegroups.com

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Massimo Belgrano
Delta Informatica S.r.l. (Cliccami per scoprire 

Pedro MT

unread,
Sep 25, 2014, 10:50:34 PM9/25/14
to Fred Philip
Hola Fred!

> Hi Pedro,
>
> are you by chance using Mediator as middleware to SQL server?
> (Mediator is offering the interface to execute functions and procedures on the database)
>
> Cheers
> Fred
>

In another mailing list passed an example. I tried it and it works perfectly ... :)
I share it in case anyone is useful.
Thanks!

oConn := CreateObject("ADODB.Connection")
oConn:ConnectionString := "PROVIDER=SQLOLEDB;DATASOURCE=myserver;DATABASE=mydbname;UID=myuser;PWD=mypassword"
oConn:Open()
oConn:Execute("sp_copiar_diagrama '"+Str(nCodDes,3)+"', '"+Str(nCodHas,3)+"' ")
oConn:Close()


Salu2!
Pedro
Web: http://www.lawebdepedro.com.ar/
pe...@lawebdepedro.com.ar
*La vida es tan buena maestra que si no apruebas una lección, te la repite.

============================================================
Usando The Bat! en Windows 7 Versión 6.1 Build 7601

Fred Philip

unread,
Sep 26, 2014, 3:39:44 PM9/26/14
to harbou...@googlegroups.com, pe...@lawebdepedro.com.ar
Hi Demonde,
 
please keep in mind when you updating tables and/or indexes) outside of Mediator through SP or SF or through straight SQL code, the information Mediator has stored in its memory (about tables and indexes) might be out of sync with the database  objects. You have to refresh the information that Mediator has stored.
 
HTH
Cheers
Fred
 
On Wednesday, September 24, 2014 4:01:42 PM UTC-4, demonde...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages