mssql server 2012 express
Moderator: Rathinagiri
mssql server 2012 express
alguien podría proporcionar un ejemplo de conexión mssql express 2012 que funcione con hmg ide. las pruebas se realizaron con el controlador odbc en windows. La prueba fue hecha con todos los ejemplos del foro pero no hace conexión. ¿existe una manera de conectar directamente en el banco sin usar origen de datos odbc de windows?
english
could anyone provide an example of connection mssql express 2012 that works with hmg ide. Tests were done with odbc driver on windows. test were done with all examples of the forum but does not make connection. is there a way to connect directly to the database without using windows odbc data source?
english
could anyone provide an example of connection mssql express 2012 that works with hmg ide. Tests were done with odbc driver on windows. test were done with all examples of the forum but does not make connection. is there a way to connect directly to the database without using windows odbc data source?
Re: mssql server 2012 express
Hi,
Try to connect sql server with utility, if success I will guide you further
Note : [1] Provide IP address of server when default instance, or provide full address like "192.168.1.25\mydata"
[2] user nage will be used as "SA" [SQL must be installed in mixed mode], [3] Provide SA user password
refer
http://expresstechnology.com/knowledgeb ... ql-server/
Use this utility at your own risk, This is for checking connectivity only, do not change any data through this utility.
Try to connect sql server with utility, if success I will guide you further
Note : [1] Provide IP address of server when default instance, or provide full address like "192.168.1.25\mydata"
[2] user nage will be used as "SA" [SQL must be installed in mixed mode], [3] Provide SA user password
refer
http://expresstechnology.com/knowledgeb ... ql-server/
Use this utility at your own risk, This is for checking connectivity only, do not change any data through this utility.
- Attachments
-
- view_sqldatabase.rar
- (1.23 MiB) Downloaded 341 times
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
-
- Posts: 174
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Re: mssql server 2012 express
Jair,
Yo probé tu EXE y si me da resultado, es decir me conecto al server, selecciono una base de datos y luego selecciono la tabla y me muestra todos los datos, asi que todo funciona bien
Yo probé tu EXE y si me da resultado, es decir me conecto al server, selecciono una base de datos y luego selecciono la tabla y me muestra todos los datos, asi que todo funciona bien
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
Re: mssql server 2012 express
bpd2000 wrote: ↑Mon Apr 15, 2019 5:18 am Hi,
Try to connect sql server with utility, if success I will guide you further
Note : [1] Provide IP address of server when default instance, or provide full address like "192.168.1.25\mydata"
[2] user nage will be used as "SA" [SQL must be installed in mixed mode], [3] Provide SA user password
refer
http://expresstechnology.com/knowledgeb ... ql-server/
Use this utility at your own risk, This is for checking connectivity only, do not change any data through this utility.
hi, I already do the connection and visualization with third party software, I would like to do with hmg without depending on third party applications, I need connection examples and sqlserver database visualization with odbc or native
Re: mssql server 2012 express
Hi Jair Pinho,
FYI, Utility provided is compiled in Harbour
It is require to prepare similar application in HMG+Harbour
Connection can be done through HMG
FYI, Utility provided is compiled in Harbour
It is require to prepare similar application in HMG+Harbour
Connection can be done through HMG
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: mssql server 2012 express
Hi!
I don't know if it help you, few years ago I wrote application working with MS SQL:
I don't know if it help you, few years ago I wrote application working with MS SQL:
Code: Select all
function SetDatabaseConnection
do while .t.
// sddodbc
RDDSETDEFAULT( "SQLMIX" )
SET( 4, "yyyy-mm-dd" )
WAIT WINDOW "Trying to connect..." NOWAIT
nConnection := RDDINFO( 1001, { "ODBC", cConStr }, 'SQLMIX' )
WAIT CLEAR
//msgbox("Connect: "+str(nConnection))
If nConnection == 0
MsgStop("Error with connection: " + cSQLBase)
if MsgYesNo("Try to make new database: " + cSQLBase + "?")
cConStr := "Driver={SQL Server};Server=" + cSQLSerwer + ";Database="+ "master" + ";Trusted_Connection=yes;Uid=" + cSQLUser + ";Pwd="+ cSQLPassword +";"
nConnection := RDDINFO( 1001, { "ODBC", cConStr }, 'SQLMIX' )
if nConnection == 0
MsgStop("Error while making new DB: "+ cSQLBase)
Release Window ALL
Quit
else
if SQL_DowolnySQL("CREATE DATABASE " + cSQLBase)
loop
else
MsgStop("Error while making new DB: "+ cSQLBase)
quit
endif
endif
else
Release Window ALL
Quit
endif
else
exit
Endif
enddo
// czy jest już tabela?
aTables := SQL_GetColumn("information_schema.tables","Table_name","Table_name='PISMA'")
if ascan(aTables, {|x| upper(x) == "PISMA"}) = 0
SQL_CreateTables()
endif
return
function SQL_DowolnySQL
param cSQL
local lOdp := .f.
local xFormatDaty
xFormatDaty := SET( _SET_DATEFORMAT, "yyyy-mm-dd" )
lodp := RDDINFO(RDDI_EXECUTE, cSQL)
SET( _SET_DATEFORMAT, xFormatDaty)
return lOdp
- Ismach
- Posts: 161
- Joined: Wed Nov 28, 2012 5:55 pm
- DBs Used: DBF, mySQL, Mariadb, postgreSQL, Oracle, Db2, Interbase, Firebird, and SQLite
- Location: Buenos Aires - Argentina
Re: mssql server 2012 express
Yo uso ADODB de winole y funciona de maravillas
en el main defino el objeto de conexion de dominio Publico
y esta funcion
Code: Select all
// Provider=SQLOLEDB; Data Source=A31ServerGenoa\dbMelloa;Initial Catalog=dbMelloa;User ID=genoa;Password=A13genoa;
// USUARIO
static ccUser := "genoa"
// PASSWORD
static ccPass := "A13genoa"
// NOMBRE DEL HOST + NOMBREDE LA BASE DE DATOS
static ccHost_NomBase := "A31ServerGenoa\dbMelloa;Initial Catalog=dbMelloa;"
// PROVEEDOR DEL API CONNECTOR
static ccProvider := "SQLOLEDB;"
en el main defino el objeto de conexion de dominio Publico
Code: Select all
PUBLIC oServer AS OBJECT
Code: Select all
FUNCTION Gus_ConectaSQLServer()
Local ccConnector := "Provider=" + ccProvider + ";" + ;
"Data Source= " + ccHost_NomBase + ";" + ;
"User ID=" + ccUser + ";" + ;
"Password=" + ccPass + ";"
// msginfo(ccConnector)
oServer := TOLEAuto():New('ADODB.Connection')
oServer:Open( ccConnector )
RETURN NIL
Re: mssql server 2012 express
could i make an example in ide, because i test your example and nothing happens what lib should i use in ide libs =?mol wrote: ↑Tue Apr 16, 2019 11:52 am Hi!
I don't know if it help you, few years ago I wrote application working with MS SQL:
Code: Select all
function SetDatabaseConnection do while .t. // sddodbc RDDSETDEFAULT( "SQLMIX" ) SET( 4, "yyyy-mm-dd" ) WAIT WINDOW "Trying to connect..." NOWAIT nConnection := RDDINFO( 1001, { "ODBC", cConStr }, 'SQLMIX' ) WAIT CLEAR //msgbox("Connect: "+str(nConnection)) If nConnection == 0 MsgStop("Error with connection: " + cSQLBase) if MsgYesNo("Try to make new database: " + cSQLBase + "?") cConStr := "Driver={SQL Server};Server=" + cSQLSerwer + ";Database="+ "master" + ";Trusted_Connection=yes;Uid=" + cSQLUser + ";Pwd="+ cSQLPassword +";" nConnection := RDDINFO( 1001, { "ODBC", cConStr }, 'SQLMIX' ) if nConnection == 0 MsgStop("Error while making new DB: "+ cSQLBase) Release Window ALL Quit else if SQL_DowolnySQL("CREATE DATABASE " + cSQLBase) loop else MsgStop("Error while making new DB: "+ cSQLBase) quit endif endif else Release Window ALL Quit endif else exit Endif enddo // czy jest już tabela? aTables := SQL_GetColumn("information_schema.tables","Table_name","Table_name='PISMA'") if ascan(aTables, {|x| upper(x) == "PISMA"}) = 0 SQL_CreateTables() endif return function SQL_DowolnySQL param cSQL local lOdp := .f. local xFormatDaty xFormatDaty := SET( _SET_DATEFORMAT, "yyyy-mm-dd" ) lodp := RDDINFO(RDDI_EXECUTE, cSQL) SET( _SET_DATEFORMAT, xFormatDaty) return lOdp
Re: mssql server 2012 express
could i make an example in ide, because i test your example and nothing happens what lib should i use in ide libs =?Ismach wrote: ↑Tue Apr 16, 2019 2:30 pm Yo uso ADODB de winole y funciona de maravillasCode: Select all
// Provider=SQLOLEDB; Data Source=A31ServerGenoa\dbMelloa;Initial Catalog=dbMelloa;User ID=genoa;Password=A13genoa; // USUARIO static ccUser := "genoa" // PASSWORD static ccPass := "A13genoa" // NOMBRE DEL HOST + NOMBREDE LA BASE DE DATOS static ccHost_NomBase := "A31ServerGenoa\dbMelloa;Initial Catalog=dbMelloa;" // PROVEEDOR DEL API CONNECTOR static ccProvider := "SQLOLEDB;"
en el main defino el objeto de conexion de dominio Publico
y esta funcionCode: Select all
PUBLIC oServer AS OBJECT
Code: Select all
FUNCTION Gus_ConectaSQLServer() Local ccConnector := "Provider=" + ccProvider + ";" + ; "Data Source= " + ccHost_NomBase + ";" + ; "User ID=" + ccUser + ";" + ; "Password=" + ccPass + ";" // msginfo(ccConnector) oServer := TOLEAuto():New('ADODB.Connection') oServer:Open( ccConnector ) RETURN NIL
-
- Posts: 174
- Joined: Mon May 19, 2014 7:43 pm
- DBs Used: DBF, SQLite, MS-SQL, ACCESS, MariaDB (en proceso)
- Location: Morelia, Mich. México
- Contact:
Re: mssql server 2012 express
jairpinho
This an example I hope help you
This an example I hope help you
- Attachments
-
- Tracking.zip
- HMG + ADO + MS-SQL
- (1.71 MiB) Downloaded 341 times
Cordialmente
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com
POSADAS SOFTWARE
Jorge Posadas Ch.
Programador independiente
Morelia, Mich.
M é x i c o .
Movil +52 44 3734 1858
SKYPE: jorge.posadasch
Email: posoft@gmx.com