Helpful Information
 
 
Category: Delphi Programming
3 easy questions . . .

First
I'm using

Delphi 7 Enterprise
M$ SQL Server 2000
M$ 2000 Server
M$ 2000 Workstation

First question:
Wich is the best option to connect Delphi with M$ Server 2000?

Second question:
I'm using ADO to connect Delphi with M$ Server 2000. I know that ADO doesn't have LocateNext. How to implement this function ( right now I'm using Locate then a Next funcion)

Last, do you know a software to document my source code? Flowcharting etc?. ( best if it is free )

First question:
Wich is the best option to connect Delphi with M$ Server 2000?
What does "connect" mean for you? Could be as simple as:
TStream.Create("\\server\share\file", fmOpenRead)... If this is not what you want, tell a little more details please.
The WinAPI (Help / Win32 or similar) is your friend...


Second question:
I'm using ADO to connect Delphi with M$ Server 2000. I know that ADO doesn't have LocateNext. How to implement this function ( right now I'm using Locate then a Next funcion)
What's bad about this way? If you need it in a ADO component, derive your own class from them ;)


Last, do you know a software to document my source code? Flowcharting etc?. ( best if it is free )
I never used Delphi 7, only the 6 version and it comes with a simple flowcharting software built-in, the charts can be connected to source code and such. You can toggle the view from source code to flowchart and vice-versa. Sorry, can't remember how to activate it, I suggest you read the manual....
Free flowcharting software has been discussed here recently, do a search.

A tip on code documentation: Search google for "javadoc", this is IMO kinda standard to document code. You put special comments in it similar to this:


procedure loadFromFile(filename: String; replace: Boolean);
{ ** Loads a document from a file
@author: me
@version: 1.0
@params:
filename: "The File's name"
replace: "true: replace the current document or false: open a new window"
...
}
begin
...
end;

JavaDoc will extract this info from your source code and make html, pdf, or other formats from it...
(I never used it with delphi, but I see no reason why it should not work)

hth,
M.

Hi
First question:
'Best way to use Delphi with MS SQL Server. Querys, stored procedures etc.



"derive your own class from them "
eeerrr... well.....mmmm.....ok.


"do a search"
I Will...


Regards.

Originally posted by Fajardo
Hi
First question:
'Best way to use Delphi with MS SQL Server. Querys, stored procedures etc.

"derive your own class from them "
eeerrr... well.....mmmm.....ok.

"do a search"
I Will...
Regards.

1. Depends on what you want to do. I use both tadoquery and tadostoredproc objects. Most of the time though, I tend to use tadostoredproc because we write stored procs for just about anything to add an extra layer of abstraction between the front end and the database engine. The reason is that it is easier to maintain that way for us. If I use a TAdostoredproc and then make a minor change to the stored proc, I don't need to redistribute the app throughout the office. With a TAdoQuery object, I need to make changes to the delphi code, recompile the app and then tell everyone in the office that uses the app, to grab the latest and greatest code.

2. Delphi's ADO objects have the Locate method which does the same thing. See the documentation for TCustomADODataSet.Locate in your help.

3. http://www.fatesoft.com/s2f/ is one. DISCLAIMER -- I just googled for it. Personally, my opinion of flowcharts is that only neanderthals drew flowcharts and look what happened to them :D. Seriously though, I'm about the only one in the office that is anal about documenting everything, and I don't draw program flowcharts much either. The only flowcharts we draw are functional diagrams to explain functionality to the managers, not actual logic flowcharts.

Thanks M.Hirsch and Scorpions4ever.










privacy (GDPR)