?
Solved

VB database reading

Posted on 2003-03-10
4
Medium Priority
?
166 Views
Last Modified: 2010-04-17
hey folks
i need help.i want to send a questionarire to a user. ask him to fill the details and resend the file . i wnt to know how do i read it back the saved information into the database ??
pls let me know
sn_sudha
0
Comment
Question by:sn_sudha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
meyerc74 earned 100 total points
ID: 8105380
if the user is sending you back a file,an approach would be to open the file and read the line and then insert the data into the database. something like this:

dim lconfigFilePath, ltmpLine, ldestinationDirectory, lsourceDirectory, lconnectionString, lqueryString, lnewFileName

lconfigFilePath = "faxyLadyManagerConfig.cfg"

set fobj = createObject("scripting.fileSystemObject")
set configFile = fobj.openTextFile(lconfigFilePath,1)

'LOOP THROUGH CONFIG FILE GETTING PARAMETERS
do while not configFile.atendofstream
     ltmpLine = configFile.readline
     
     if ( left(ltmpLine,1) = "D") then
          ldestinationDirectory = configFile.readline
     end if
     
     if ( left(ltmpLine,1) = "F") then
          lsourceDirectory = configFile.readline
     end if
     
     if ( left(ltmpLine,1) = "S") then
               lconnectionString = configFile.readline
     end if
loop

'FINISHED WITH CONFIG FILE - DESTROY
set configFile = nothing

then do your database stuff.

there above is a vbscript file i wrote.  basically what it does is open a config file, and get the values for source directory, destionation directory and SQL connection string.
0
 
LVL 3

Assisted Solution

by:prd00
prd00 earned 100 total points
ID: 8108636
The easiest thing is using CSV. Depend on what VB you use.. This is using VB6.

dim TempLine as string, Fields() as variant

open "file.csv" for input as 1
do while not eof(1)
  lineinput #1, TempLine
  Fields = split(TempLine, ",")
  'Process your data here..
loop
0
 

Expert Comment

by:CleanupPing
ID: 9447230
sn_sudha:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Introduction to Processes
Starting up a Project
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question