Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling from SQL server 6.5

Status
Not open for further replies.

Senjen

Programmer
Jul 14, 2000
23
US
I have a new project that will involve pulling data from tables in SQL server. Any information that will make this process efficient would be appreciated.
 
Use ADO
Download MDAC 2.5 (Microsoft Data Access Control) from Microsofts WEB site, which is the new ODBC drivers for SQL.
the file name is "mdac_typ.exe" which is ~7.5 meg.
this must be loaded on each computer that will read the SQL database.

here is a snippet of Access '97 code to open a SQL 7 database using ADO-db

' SQL connections
Dim Conn As ADODB.Connection
Dim MyTransSQL As ADODB.Recordset
Dim SQLcode As String

Set Conn = New ADODB.Connection
Set MyTransSQL = New ADODB.Recordset
Conn.Open "driver=SQL Server;server=smallbserver;uid=sa;pwd=;database=Universal;"

SQLcode = "INSERT INTO TransLog (LogInfo) VALUES (N'" & WhattoAdd & " Date > " & Format$(Now, "ddd mm/dd/yy") & " " & Format(Now, "hh:nn:ss") & "')"
MyTransSQL.Open SQLcode, Conn, adOpenStatic, adLockOptimistic

I am fortunate that I have the SQL server setting right next to my developement PC. So I use the Enterprise Manager in the Server and let it build the correct SQL synatax.
In my example I an Inserting a value column name "LogInfo" in a table called "TransLog" .
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
thanks! I'll work with this awhile and see how it goes. have you ever heard of third party ap's being used to pull the data?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top