mod harbour connected to MS SQL

mod harbour connected to MS SQL

Postby Otto » Mon Apr 12, 2021 8:07 pm

Dear friends,

Mr. Rao shows us how we can connect from mod harbour to MS SQL.

You see mod harbour working against MSSQL. For this to work you need to first install Microsoft OLEDB driver for SQL:
Download Link:
https://docs.microsoft.com/.../download ... iver-for...
Please download 64-bit version and install.
Then the above program will run in mod-harbour.
Note: We do not need to install SQL server on our PC/Server
The name of the installation file you downloaded should be "msoledbsql.msi".
After installing this and restarting the computer, you should find "c:\windows\system32\msoledbsql.dll"
That means the installation is complete.

Best regards,
Otto
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: mod harbour connected to MS SQL

Postby cnavarro » Mon Apr 12, 2021 9:06 pm

Dear Otto
Link not run
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: mod harbour connected to MS SQL

Postby nageswaragunupudi » Mon Apr 12, 2021 9:23 pm

Function to generate HTML table from a RecordSet.
This code does not depend on FWH and can be used in any non-fwh Harbour application.
Code: Select all  Expand view
function RecordSetToHTML( oRs, lHtmlPage )

   local cHTML := ""
   local bm, n

   cHTML := [<table border="1" width="100%">]
   cHTML += "<tr>"
   for n := 0 to oRs:Fields:Count() - 1
      cHTML += ( "<td><b>" + oRs:Fields( n ):Name + "</b></td>" )
   next
   cHTML += "</tr>"

   if oRs:RecordCount() > 0
      bm    := oRs:Bookmark
      oRs:MoveFirst()
      cHTML += "<tr><td>"
      cHTML += oRs:GetString( 2, oRs:RecordCount(), "</td><td>","</td></tr><tr><td>","&nbsp;" )
      cHTML += "</td></tr>"
      oRs:MoveFirst()
      oRs:BookMark   := bm
   endif
   cHTML += "</table>"

   if lHtmlPage == .t.
      cHTML := "<html>" + CRLF + "<body>" + CRLF + cHTML + CRLF + "</body>" + CRLF + "</html>"
   endif

return cHTML
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: mod harbour connected to MS SQL

Postby nageswaragunupudi » Mon Apr 12, 2021 9:26 pm

cnavarro wrote:Dear Otto
Link not run


https://docs.microsoft.com/en-us/sql/co ... rver-ver15

"https://docs.microsoft.com/en-us/sql/connect/oledb/download-oledb-driver-for-sql-server?view=sql-server-ver15"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: mod harbour connected to MS SQL

Postby Otto » Mon Apr 12, 2021 9:38 pm

Dear Mr. Rao,
Thank you.
It is working fine.

Image

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: mod harbour connected to MS SQL

Postby nageswaragunupudi » Mon Apr 12, 2021 9:46 pm

Wonderful.
Thank you.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 114 guests