Re: To saga



What kind of application do you need to build?

I can offer some suggestions...

a. Use ADO when accessing a client/server (c/s) DB, like SQL Server.
b. A c/s implementation is usually accessed through a network, so
keep whatever travels on the network as short as possible. For example,
if querying for data, use the WHERE clause to limit the result set.
c. In a c/s environment, avoid opening tables, instead bring back only
the data that you need (very similar to 'b')
d. Make prudent use of Triggers. Do not use them to validate data
entered by the user. Validate user entered data in the presentation
layer. This avoid unnecessary traffic on the network.
e. To make the app flexible, use catalogs for attributes that can vary.
For example, if the user has to enter an id number and the document
where it came from, it could be a driver's license, passport, gov. id
or many others. Allowing the administrative user to define this list
in a table given the user more flexibility.
f. Do not create a recordset when executing SQL statements that don't
return results, like INSERT, DELETE and UPDATE (among others).
g. When possible, use stored procedures and have them do as much
work as possible.
h. Avoid using the sa admin user in SQL Server. Instread create a
different user that your app can use and give that user the necessary
permission that your app needs.
i. If you build your SQL within your VB code and the data being queried
or saved is text (varchar/char, etc) always replace the single quote ( ' )
for two single quotes ( '' = chr$(39) & chr$(39) )
j. When embedding dates in your SQL that is built in your VB code,
always use the yyyy-mm-dd format, regardless of your regional settings.
k. When doing the same with numbers, make sure the number does not
have a thousands seperator and that the decimal seperator is a dot.
l. Avoid all the problems mentioned in "i", "j", and "k" by using parameters.
(This is the parameter object in ADO).

Best of luck! Saga
--


"teresacab" <teresacab@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0D7A4B18-877F-4C1D-9D73-6519EBBE4F3D@xxxxxxxxxxxxxxxx
Saga hello
the app I need to build is in visual basic 6.0 data base sql server 7.0 and
2000.
I hope yuor answer. Thanks.
Teresa


Your question is very broad. One thing is to have best practices for
programming
in VB6 and another very different to have best practices while building a
client/
server application.

Your example is a good one. You should always try to avoid hard coding items
like disk drives, but this also applies to any other settings that your app
may need.
Other general best practice include making the application consistent so that
the user will feel comfortable in all its screens. Whenever possible, follow a
generally accepted UI design. And of course, a classic, do not use the End
statement to end your program :-).

One possible best practice for client/server is to validate your user input in
the presentation layer and not at theback end, but some may disagree.

If you explain in more detail what sort of app you need to build, including
the
data base that you will be using perhaps others can provide a more concise
answer to your question.

Regards, Saga
--



"teresacab" <teresacab@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0519C44A-EAFE-4D34-8597-523490C4CC0F@xxxxxxxxxxxxxxxx
Hello my name is teresa from chile

I need to know which should be the best practices to programming in visual
basic 6.0 for aplications client server. Thanks.



Sorry my english...



For example:



Not use directlty in the code units of disc



d:

c:







.



Relevant Pages

  • Re: VSS Integration
    ... Don't check code in that will break the app. ... Don't keep code checked out if you will be gone for extended amount of ... Software Tools for .NET, SQL Server, Visual Basic & Access ... > outline or point me to some best practices for managing these projects. ...
    (microsoft.public.access.gettingstarted)
  • Re: Performance issue after coverting from Framework 1.1 to 2.0
    ... I think that I encountered the same problem: A large program with Framework ... the SQL Server for the dev database. ... when you deploy the app on a different machine where the SQL Server is no ... app was fine on the dev machine. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: C5 woes. How stable is VFP really?
    ... After that I close the SQL server cursor and work with my manual cursor instead. ... a VFP9 app on a really old machine ... app was under more "pressure", VFP showed ...
    (microsoft.public.fox.programmer.exchange)
  • Re: New to .Net
    ... a copy of Pro although technically you can build apps without it. ... "Paul Ilacqua" wrote in message ... I just need to get the syntax to build a VB.NET - SQL Server ... >> ui and do things pretty much like a full framework app. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Webservices - the way to go...?
    ... about your lack of secure network connectivity your between a rock and a ... To summarize the posts so far: you have a winform app. ... using a webservices data layer to handle all the database interactions. ... Upgrade your database to SQL Server. ...
    (microsoft.public.dotnet.general)