Ray
Tue Jul 08 12:16:45 CDT 2003
Yeah, the connection strings site is just for connection strings. I don't
think there's any SQL examples. They're all over the place though.
Basically, what you do is create an ADOBC.Connection and execute a SQL
command. But what are the SQL commands? You have INSERT, DELETE, UPDATE,
SELECT as the basics. Here are some sample SQL commands:
INSERT INTO [Table1] (Column1,Column2) VALUES (3, 'A word');
DELETE FROM [Table1] WHERE [Column9]='a value';
UPDATE [Table1] SET [Column1]=5 WHERE [Column1]=50
Don't do the "Set NameOfRecordSet=objADO.Execute(sSQL)" when inserting,
deleting, or updating. Just do:
Set objADO = CreateObject("ADODB.Connection")
objADO.Open YourConnectionString
objADO.Execute sSQL
objADO.Close
Set objADO = Nothing
One way to help yourself learn some querying is to design the query in
Access, if you're familiar with Access, and then switch to SQL view to see
the SQL it generated.
Ray at work
"Noël" <n03l@hotmail.com> wrote in message
news:%23ROHHCXRDHA.2432@TK2MSFTNGP10.phx.gbl...
> |
>
> Thank you Ray, reading from the DB is working great! Now I need to figer
out
> a way how to write "Ray" to the DB.
> I've had a look at
http://www.connectionstrings.com , but did not find a
> way to do this part (yet).
>
> Noel.
>
>