 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Geoff Marshall Guest
|
Posted: Sun Apr 17, 2005 7:02 am Post subject: Newby to MSSQL |
|
|
Delphi 5
My client wants me to interact with his MSSQL database, and I don't have one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
Do I need any ODBC settings? In which case how do I set these up and how do
I use them in Delphi?
I see in ADOConnection there is a ConnectionString. Do I simply point this
at the database on the server? If not then what?
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
I assume ADOTable is the equivelent of a Table and should be avoided at all
cost!
Help on any of thiese points would be much appreciated.
Geoff Marshall
|
|
| Back to top |
|
 |
Geoff Marshall Guest
|
Posted: Sun Apr 17, 2005 7:54 am Post subject: Re: Newby to MSSQL |
|
|
Thanks Barak, that looks splendid. Just one final point I forgot to
mention, the database is on a server. How do I point to the server? I
assume it is somthing to do wht then "Provider=SQLOLEDB" bit.
Geoff
"Barak zabari" <lotemlotad (AT) yahoo (DOT) com> wrote
| Quote: | My client wants me to interact with his MSSQL database, and I don't have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
I recmommend you Download MSDE
(http://www.microsoft.com/sql/msde/default.asp) that is MS free version of
MSSQL this will allow you to test what you do before dumping it on the
client.
Do I need any ODBC settings? In which case how do I set these up and how
do
I use them in Delphi?
No, you can use the ADO connect string
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
Yes, Ado Connect string should look something like this
"Provider=SQLOLEDB;Integrated Security=SSPI;Initial catalog=master.
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
If you want to open the Query on it's own connection.
Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
The ADODataSet is the prefered componnet to replace TTable (it work better
then TAdoTable in many cases while provideing most of the fanctions)
I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
Yes.
Good luck
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> wrote in message
news:42620a19$1 (AT) newsgroups (DOT) borland.com...
Delphi 5
My client wants me to interact with his MSSQL database, and I don't have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
Do I need any ODBC settings? In which case how do I set these up and how
do
I use them in Delphi?
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
Help on any of thiese points would be much appreciated.
Geoff Marshall
|
|
|
| Back to top |
|
 |
Geoff Marshall Guest
|
Posted: Sun Apr 17, 2005 8:09 am Post subject: Re: Newby to MSSQL |
|
|
Once again thanks... er... um... er ....Barak,
I'm getting old, a mind jogger is just what I need.
and thanks also for the connection string, I can really get going now.
now what was that name..... oh yes..
Geoff
"Barak zabari" <lotemlotad (AT) yahoo (DOT) com> wrote
| Quote: | Sorry when i replace the names i use at my location i cut the the string
to
short
Provider=SQLOLEDB;Data Source=server_name;Initial
Catalog=database_name;User
ID=user_name ;Password=pass;Persist Security Info=True
this is if you use fix user/password
This site will be a lot of help for those with short memory (me)
http://www.connectionstrings.com/
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> wrote in message
news:4262162a (AT) newsgroups (DOT) borland.com...
Thanks Barak, that looks splendid. Just one final point I forgot to
mention, the database is on a server. How do I point to the server? I
assume it is somthing to do wht then "Provider=SQLOLEDB" bit.
Geoff
"Barak zabari" <lotemlotad (AT) yahoo (DOT) com> wrote in message
news:426211c0 (AT) newsgroups (DOT) borland.com...
My client wants me to interact with his MSSQL database, and I don't
have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
I recmommend you Download MSDE
(http://www.microsoft.com/sql/msde/default.asp) that is MS free version
of
MSSQL this will allow you to test what you do before dumping it on the
client.
Do I need any ODBC settings? In which case how do I set these up and
how
do
I use them in Delphi?
No, you can use the ADO connect string
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
Yes, Ado Connect string should look something like this
"Provider=SQLOLEDB;Integrated Security=SSPI;Initial catalog=master.
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
If you want to open the Query on it's own connection.
Where does ADODataSet fit in? Is it the equivelent of a
ClientDataSet?
shoudl it be used? is it to be avoided?
The ADODataSet is the prefered componnet to replace TTable (it work
better
then TAdoTable in many cases while provideing most of the fanctions)
I assume ADOTable is the equivelent of a Table and should be avoided
at
all
cost!
Yes.
Good luck
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> wrote in message
news:42620a19$1 (AT) newsgroups (DOT) borland.com...
Delphi 5
My client wants me to interact with his MSSQL database, and I don't
have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
Do I need any ODBC settings? In which case how do I set these up and
how
do
I use them in Delphi?
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
Where does ADODataSet fit in? Is it the equivelent of a
ClientDataSet?
shoudl it be used? is it to be avoided?
I assume ADOTable is the equivelent of a Table and should be avoided
at
all
cost!
Help on any of thiese points would be much appreciated.
Geoff Marshall
|
|
|
| Back to top |
|
 |
Barak zabari Guest
|
Posted: Sun Apr 17, 2005 8:35 am Post subject: Re: Newby to MSSQL |
|
|
| Quote: | My client wants me to interact with his MSSQL database, and I don't have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
I recmommend you Download MSDE |
(http://www.microsoft.com/sql/msde/default.asp) that is MS free version of
MSSQL this will allow you to test what you do before dumping it on the
client.
| Quote: | Do I need any ODBC settings? In which case how do I set these up and how
do
I use them in Delphi?
No, you can use the ADO connect string |
| Quote: | I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
Yes, Ado Connect string should look something like this |
"Provider=SQLOLEDB;Integrated Security=SSPI;Initial catalog=master.
| Quote: | I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
If you want to open the Query on it's own connection. |
| Quote: | Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
The ADODataSet is the prefered componnet to replace TTable (it work better |
then TAdoTable in many cases while provideing most of the fanctions)
| Quote: | I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
|
Yes.
Good luck
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> wrote
| Quote: | Delphi 5
My client wants me to interact with his MSSQL database, and I don't have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
Do I need any ODBC settings? In which case how do I set these up and how
do
I use them in Delphi?
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
Help on any of thiese points would be much appreciated.
Geoff Marshall
|
|
|
| Back to top |
|
 |
Barak zabari Guest
|
Posted: Sun Apr 17, 2005 9:03 am Post subject: Re: Newby to MSSQL |
|
|
Sorry when i replace the names i use at my location i cut the the string to
short
Provider=SQLOLEDB;Data Source=server_name;Initial Catalog=database_name;User
ID=user_name ;Password=pass;Persist Security Info=True
this is if you use fix user/password
This site will be a lot of help for those with short memory (me)
http://www.connectionstrings.com/
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> wrote
| Quote: | Thanks Barak, that looks splendid. Just one final point I forgot to
mention, the database is on a server. How do I point to the server? I
assume it is somthing to do wht then "Provider=SQLOLEDB" bit.
Geoff
"Barak zabari" <lotemlotad (AT) yahoo (DOT) com> wrote in message
news:426211c0 (AT) newsgroups (DOT) borland.com...
My client wants me to interact with his MSSQL database, and I don't
have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
I recmommend you Download MSDE
(http://www.microsoft.com/sql/msde/default.asp) that is MS free version
of
MSSQL this will allow you to test what you do before dumping it on the
client.
Do I need any ODBC settings? In which case how do I set these up and
how
do
I use them in Delphi?
No, you can use the ADO connect string
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
Yes, Ado Connect string should look something like this
"Provider=SQLOLEDB;Integrated Security=SSPI;Initial catalog=master.
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
If you want to open the Query on it's own connection.
Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
The ADODataSet is the prefered componnet to replace TTable (it work
better
then TAdoTable in many cases while provideing most of the fanctions)
I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
Yes.
Good luck
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> wrote in message
news:42620a19$1 (AT) newsgroups (DOT) borland.com...
Delphi 5
My client wants me to interact with his MSSQL database, and I don't
have
one
here to play with. Can anybody give tell me or point me to the basic
connection method please.
Do I need any ODBC settings? In which case how do I set these up and
how
do
I use them in Delphi?
I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
Help on any of thiese points would be much appreciated.
Geoff Marshall
|
|
|
| Back to top |
|
 |
Roman Krejci Guest
|
Posted: Mon Apr 18, 2005 9:58 am Post subject: Re: Newby to MSSQL |
|
|
"Geoff Marshall" <gemsys (AT) btclick (DOT) com> píše v diskusním příspěvku
news:42620a19$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Delphi 5
Do I need any ODBC settings? In which case how do I set these up and how
do
I use them in Delphi?
|
Forget about ODBC. The preferred access method for MSSQL is ADO
| Quote: | I see in ADOConnection there is a ConnectionString. Do I simply point
this
at the database on the server? If not then what?
|
Barak did show you some examples. Generally, the connection
string is semicolon separated list of pairs NAME=VALUE.
For all possible NAME/VALUE pairs, you can consult
Microsoft documentation. There is also a "connection string builder"
available in Delphi: you can use this builder at design time
for creating the ConnectionString property in tADOConnection.
You can also launch the builder from code as
uses AdoConEd
With TConnEditForm.Create(nil) do Try
SomeNewConnectionString := Edit(SomeCurrentConnectionString);
finally
Free;
End;
| Quote: | I see that ADOQuery has a Connection (OK) but then it also has a
ConnectionString. What would this be used for?
|
Forget about tADOQuery or tADOTable components.
These are meant only for facilitating the BDE to ADO refactoring.
Stick to
1) tADODataset component where you need cursors
2) tADOCommand for issuing action SQL commands
3) tADOStoredProc for invoking stored procedures
As to the ConnectionString property of tADOQuery, this is an alternative
way of specifying database connection instead of providing
value for Connection: tADOConnection property.
Personally, I prefer using Connection property.
| Quote: | Where does ADODataSet fit in? Is it the equivelent of a ClientDataSet?
shoudl it be used? is it to be avoided?
|
See above. Quite on the contrary - you should avoid the simplified
tADOQuery and tADOTable components.
And no - tADODataSet is not equivelent of a tClientDataSet.
| Quote: |
I assume ADOTable is the equivelent of a Table and should be avoided at
all
cost!
|
Same as tADOQuery is equivalent of tQuery - both should be avoided:-)
Regards
--
Roman
mail: [email]info (AT) rksolution (DOT) cz[/email]
URL: www.rksolution.cz
|
|
| Back to top |
|
 |
Joe Griffin Guest
|
Posted: Tue Apr 19, 2005 8:16 pm Post subject: Re: Newby to MSSQL |
|
|
Geoff Marshall wrote:
| Quote: | My client wants me to interact with his MSSQL database, and I don't have one
here to play with.
|
Geoff, don't forget that you can now buy the Develeoper's Edition of MSSQL from
QBS for 49 quid. (Says someone who bought it for 249 a while back.) It gives
you all the features of the server-based DB and I find it invaluable for
development.
... Joe
Member of the UK Borland User Group
|
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Tue Apr 19, 2005 9:37 pm Post subject: Re: Newby to MSSQL |
|
|
Joe Griffin wrote:
| Quote: | Geoff Marshall wrote:
My client wants me to interact with his MSSQL database, and I don't
have one here to play with.
Geoff, don't forget that you can now buy the Develeoper's Edition of
MSSQL from QBS for 49 quid.
|
Also you get it free with most recent Delphi SKUs.
--
Craig Stuntz [TeamB] ˇ Vertex Systems Corp. ˇ Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
http://qc.borland.com -- Vote for important issues
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|