|
-
Feb 25th, 2001, 05:53 AM
#1
Thread Starter
New Member
Hello People,
I'm trying to create a online investment portfolio tool
At the moment I have a database with share prices and data on portfolio holdings.
Now one problem I have is updating the share prices. My solution is to downlaod a csv file from another website and try to import this into the database using vbscript, but this is done at night.
I'm just wondering if there is any other way I could update the share prices, may be by getting the data directly from another server or something.
anyone with any ideas, very much appreciated!
-
Feb 25th, 2001, 11:32 AM
#2
Guru
here is some VB/ADO code I have previously written to connect to a CSV text file. This should get you started with what you need to do (assuming you're familiar with databases and VB vs. VBScript)
Code:
'Uses ADO 2.1+
Dim cn As Connection
Dim rs As Recordset
Set cn = New Connection
Set rs = New Recordset
'open connection to folder that contains the CSV file
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\;Extended Properties=Text;"
'open the file
rs.Open "select * from test.csv", cn
'we have data
MsgBox rs.Fields(1).Value
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|