Choosing SQL database ...

Re: Choosing SQL database ...

Postby Rimantas » Sat Oct 24, 2009 12:30 pm

Adolfo wrote:Rimantas

I don't use TSqlite
I use an ODBC Client for SqLite, so I connect to it via ADO 8)

And is as fast as any dbf used locally.

Adolfo


Hello Adolfo ,

:( .. Sorry , I was thinking that you are working with SQLite through wrapper . Hmmm ... maybe it's a better way . ADO techn. is more free from wrappers - the same code will work good with many DBMS , except some issues . Though Rick wroted in earlier , that the last ADO use .net technology and exist some problems . Maybe they are not big ... :) .

With best regards !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Choosing SQL database ...

Postby Rick Lipkin » Sat Oct 24, 2009 3:37 pm

Rimantas

The reason I like SQL Server is because you do NOT need .net framework .. you do NOT need any client like Oracle, dB2 or some other SQL flavors which REQUIRE a run-time client. If I have to develop an application that needs to run on any Windows computer .. I do not want to have to make sure there is an ODBC or a run-time ( .net framework ) client configured on each pc .. All windows operating systems have native connectivity to MS Sql server .. right out of the box .. nothing to configure .. it just runs with your ADO code.

I worked for a large state Agency with over 5k users .. you think I want to make sure all 5k desktops have ODBC configured .. or have the correct version of .net framework .. I would be doing nothing but answering help desk calls on configuration connectivity issues ..

For me .. SQL Server and ADO is a perfect match .. just compile your .exe and distribute it .. burn in your connection string credentials into your app .. and you are done ..

Rick Lipkin
SC Criminal Justice Academy
User avatar
Rick Lipkin
 
Posts: 2663
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Choosing SQL database ...

Postby Rimantas » Sun Oct 25, 2009 5:30 pm

Rick Lipkin wrote:Rimantas
...
I worked for a large state Agency with over 5k users .. you think I want to make sure all 5k desktops have ODBC configured .. or have the correct version of .net framework .. I would be doing nothing but answering help desk calls on configuration connectivity issues ..

For me .. SQL Server and ADO is a perfect match .. just compile your .exe and distribute it .. burn in your connection string credentials into your app .. and you are done ..
...


Thank , Rick , for your comprehensive answer ...

Can you share with source code for connection ?

With best regards !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Choosing SQL database ...

Postby Rick Lipkin » Sun Oct 25, 2009 5:41 pm

Rimantas

Here is the link that will explain it all .. has connections and syntax for .mdb ( access ) as well as Sql Server:

http://wiki.fivetechsoft.com/doku.php?i ... uffs&s=ado

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2663
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Choosing SQL database ...

Postby Rimantas » Mon Oct 26, 2009 7:05 am

Rick Lipkin wrote:Rimantas

Here is the link that will explain it all .. has connections and syntax for .mdb ( access ) as well as Sql Server:

http://wiki.fivetechsoft.com/doku.php?i ... uffs&s=ado

Rick Lipkin


Thanks again , Rick !

Another question : how to connect to remote server ? The enterprise have 2 divisions and it's requiremets to view data in other city . At this time they are using "Remote Desktop Connection" . But that method isn't comfortable . Better will be to view data fron the same application , only changing connection . Is this possible ?

Regards !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Choosing SQL database ...

Postby anserkk » Mon Oct 26, 2009 7:12 am

Dear Mr.Rimantas,

To connect to Database server on a remote server the follwing has to be considered.

1) Internet connection should be available on the PC running the database server
2) Instead of localhost or 127.0.0.1, the connection string on your client PC app should have either the Internet IP or Domain name
3) If the network (Database server network) has firewall, then you may have to do a port forwarding on the firewall.

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Choosing SQL database ...

Postby Rimantas » Mon Oct 26, 2009 9:11 am

anserkk wrote:Dear Mr.Rimantas,

To connect to Database server on a remote server the follwing has to be considered.

1) Internet connection should be available on the PC running the database server
2) Instead of localhost or 127.0.0.1, the connection string on your client PC app should have either the Internet IP or Domain name
3) If the network (Database server network) has firewall, then you may have to do a port forwarding on the firewall.

Regards
Anser


Anser , many thanks for explanation .

Regards !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Choosing SQL database ...

Postby Rimantas » Mon Oct 26, 2009 7:37 pm

Adolfo wrote:Rimantas
I use an ODBC Client for SqLite, so I connect to it via ADO 8)
Adolfo


Adolfo ,

Please help me again . In SqLite.org site they are providing only SqLite ODBC for connection . I downloaded this , hoping that with ODBC drivers will be and OLE DB Provider . Sorry , but here was only ODBC install package . So at this moment I can't understand what you are using . ODBC it's one thing , ADO - another . Both I know and want to accurate - you are talking about something that : cConnectionString := "DSN=odbc name ;UID=YOURUSERID;PWD=YOURPASSWORD;" ?

With best regards !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Choosing SQL database ...

Postby TimStone » Mon Oct 26, 2009 8:17 pm

I would like to know where you can get a free 25 user license of MySQL ? When I read the licensing, a commercial application requires you to purchase a license.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2943
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Choosing SQL database ...

Postby Adolfo » Mon Oct 26, 2009 8:46 pm

Rimantas wrote:
Adolfo wrote:Rimantas
I use an ODBC Client for SqLite, so I connect to it via ADO 8)
Adolfo


Adolfo ,

Please help me again . In SqLite.org site they are providing only SqLite ODBC for connection . I downloaded this , hoping that with ODBC drivers will be and OLE DB Provider . Sorry , but here was only ODBC install package . So at this moment I can't understand what you are using . ODBC it's one thing , ADO - another . Both I know and want to accurate - you are talking about something that : cConnectionString := "DSN=odbc name ;UID=YOURUSERID;PWD=YOURPASSWORD;" ?

With best regards !



Simplier than that...

Install the ODBC SQLITE CLIENT.. and that's all, no need to configure DSN or anything.
In your connection string use this..
Code: Select all  Expand view
 
TRY
      oCn:= CreateObject( "ADODB.Connection" )
      oCs:= "DRIVER={SQLite3 ODBC Driver};Database=" + Alltrim(cPathDb) + "Tele.db"
      oCn:Open(oCs)
      Retorno:=.T.
CATCH oErr
      MSGAlert( "Error: " + oErr:Operation + " -> " + oErr:Description )
      Retorno:=.F.
END
 


In fact, you can configure you application install, to do both things, Install the Odbc Client in silent mode and your application, and there'll be no need to configure anything else.

Send me a mail.

From Chile
Adolfo
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: Choosing SQL database ...

Postby reinaldocrespo » Mon Oct 26, 2009 9:35 pm

Rimantas;

AFAIK -SQLite is NOT client-server. It can't be compared to ADS unless you are comparing to the local version. Check on the SQLite website their recommended use. It is pretty much to be used by apps running on the server itself (like a php webpage). Otherwise it is subject to corruption just like any non client-server database.

One advantage with ADS is that you do NOT need ADO, or change any code. You may continue with

dbusearea()
dbEval()
Browse()
odbf:skip()
(calias)->goto()
etc...

And if you prefer SQL statements, then:

cSql := "Select * from customers where zipcode = '12345' "
AdsExecuteSqlDirect( cSql )...

cSql := "Update customers set zipcode = '12345' where zipcode is null"
AdsExecuteSqlDirect()...

If your customer grows or the opportunity arises to sell to a bigger customer, then all you do is sell them the server version. No code changes. Access your dbf/adt tables via internet or LAN, all the same, just change ads.ini.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Choosing SQL database ...

Postby Adolfo » Tue Oct 27, 2009 1:15 am

Reinaldo...

I like this kind of "guerras santas"... but here you have something to consider this self-contained, serverless, zero-configuration, transactional SQL database engine.

http://www.sqlite.org/different.html

Off Course you can't compare a dozens thousands dollars product with a FREE one.
And mainly... this one was very difficult to understand to me... but.. if you are going to use SQL, do it in SQL, forget about USE, DBEval or whatever CLIPPER like command.. and what for you is an advantage... for me is not... FORGET ABOUT DBF's.. so ADS with support for that.. is not a characteristic to be considered.

I don't know where did you get that SQLITE gets corrupted.. although in their WEBSITE they said that in very rare and strange situations it would happen.. doing a google only shows problems with bad code or bad installations.. not bad product.

Also you have to consider end user cost...

Finally... if you read Rimantas NEEDS.. Sqlite fullfils it with no problem.... ADS will be a big white elephant for such a project.

My 2.5 cents

( although I would've use Mysql ) :lol:

From Chile
Adolfo
;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
User avatar
Adolfo
 
Posts: 860
Joined: Tue Oct 11, 2005 11:57 am
Location: Chile

Re: Choosing SQL database ...

Postby reinaldocrespo » Tue Oct 27, 2009 1:50 am

Adolfo;

There is actually a word for "guerra santa" - Jihad!

What SQLite offers for free, is exactly what ADS local offers for free --and you are **not** forced to use the traditional dbf navigation (dbskip(), etc...).

I'm not saying SQLite is a bad product. You are misquoting here or at least misunderstanding. Check my post again. For NON-Client-Server databases, SQLite is as good as ADS on local mode. AMOF; I can't see how SQLite offers any advantage over ADS-local --unless not having the option to navigate the database is an advantage... or perhaps NOT having the option to leverage your dbf-navigation knowledge is an advantage...

If you ever want to market your application to bigger customers with hundreds of users or wish to move to client-server technology, you have a choice to move to client server mode with ADS (no code changes). No choice with SQLite. Simply no client-server architecture. Period.

On the subject of ISAM Vs. SQL, keep in mind that there are things you can do with ISAM that simply can't be done with SQL. Try browsing (or incremental seeking) a dbf (a table in sql language) with 1million records. There are many other situations where ISAM is faster and/or logical than SQL. Have you seen a 200 line SQL script? Some operations, I rather use dbseek()... Granted; there are operations that are more logical and/or faster when performed via SQL statement. But with ADS you keep ISAM while adding SQL. win-win situation.

I think you are also mistaken about the cost of ADS-Server. I've never seen a ADS-Server version that costs "dozens thousands dollars". Not even for more than 250 users. And again, ADS-Local (non-client-server) is free.

Your 2 cents + my 2 cents = 4 cents (or maybe more....?)


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Choosing SQL database ...

Postby anserkk » Tue Oct 27, 2009 4:30 am

Dear Mr.Adolfo,

In fact, you can configure you application install, to do both things, Install the Odbc Client in silent mode and your application, and there'll be no need to configure anything else.


If you don't mind, I would like to know more about this. :) . I am using MySQL. If this is possible then we will be able to install MySQL ODBC driver along with the application. So this will rule out one of the disadvantages of using databases other than MS SQL Server that Mr.Rick has already pointed out.

Quote by Mr.Rick
The reason I like SQL Server is because you do NOT need .net framework .. you do NOT need any client like Oracle, dB2 or some other SQL flavors which REQUIRE a run-time client. If I have to develop an application that needs to run on any Windows computer .. I do not want to have to make sure there is an ODBC or a run-time ( .net framework ) client configured on each pc .. All windows operating systems have native connectivity to MS Sql server .. right out of the box .. nothing to configure .. it just runs with your ADO code.

My intention is that when I run my FWH app, the FWH application should be able to check whether the ODBC driver is installed or not. If not installed then it will install the ODBC driver in Silent mode

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Choosing SQL database ...

Postby Rimantas » Tue Oct 27, 2009 6:01 am

reinaldocrespo wrote:Adolfo;
...I can't see how SQLite offers any advantage over ADS-local ...


Reinaldo ,

I'm rewroting old project . The main requirement - to view data remotely , from others divisions . About 5-6 years ago I tried ADS local with this project and can say that this worked very slowly , so I stayed with DBF+CDX . So your suggestion to use ADS local in network enviroment isn't good . About 1 year ago I wroted some parts with FireBird and ADO . It worked fine , very fast . So I decided to change DBFs with SQL and , as Adolfo said , forget DBFs .. :) If SQLite will not fullfit our needs then I'll adopt this with FireBird .

With best regards !
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests