473,320 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Insert Data

I try to insert some data in my table name customer(Customer_Name,
Street, Account_No) from data:
[Customer's Name]
[Street]
[Account Number]
How to i do that needs help
-----------------------------------------------------

Set con = Server.CreateObject("ADODB.Connection")
sConnection ="Provider=MSDASQL.1;Persist Security Info=False;Data
Source=emp1"
con.Open(sConnection)

Function EnumerateFolder( sFolder )
Dim fso, ts, data
Set fso = CreateObject("Scripting.FileSystemObject")
Set fol = fso.Getfolder ( server.mappath(sfolder) )
For each fil in fol.files
Set customer = CreateObject("Scripting.Dictionary")
Set ts = fil.openastextstream(1)
ary = Split(ts.ReadAll(),"[")
ts.Close
For i = 1 to Ubound(ary)
data = Split(ary(i),"]")
customer.Add data(0), data(1)
Next
next
End Function

EnumerateFolder "c:\txt"

Function test(s)
Select Case s

Case "[Dat"
test = True

Case "[Nov"
test = True

Case "[Sub"
test = True

Case "[Cus"
test = True

Case "[Str"
test = True

Case "[Cit"
test = True

Case "[Acc"
test = True

Case "[Ins"
test = True

Case "[Las"
test = True

Case "[PPV"
test = True

Case "[Mon"
test = True

Case "[Cur"
test = True

Case "[Typ"
test = True

Case "[Lan"
test = True

Case "[CRC"
test = True

Case "[Eve"
test = True

Case "[Sum"
test = True

Case "[Box"
test = True

Case "[MD"
test = True

Case "[Con"
test = True

End Select
End Function

-----SAMPLE DATA-----
[Date]
Sat Aug 05 14:06:12 EDT 2006

[Novell ID]
NSMITH4

[Subject]
PPV / VOD Research - Dispute - 1st Time - 711579

[Customer's Name]
EDWARD CAMPBELL

[Street]
5 WHEELER AVE APT 2

[City, State, Zip]
BRIDGEPORT CT, 06606

[Account Number]
006-0416-08

[Install Date]
06/21/2001

[Last Known Event Date]
06/29/2006

[PPV Hold]
No

[Monthly Rate]
186.52

[Current Services]
Optimum Voice
OOL FamilyorAbv
OR$20Discount
iO Silver Pkg
iO Box
PPOF
Addset: C/Rdy
OV World Call
OV Ported Number

[Type of Request]
Dispute - 1st Time

[Language]
English

[CRC PIN Instructions]
Yes

[Event Numbers/Date Range]
#77922 6/29, #78306 6/29, #77716 6/28, #77312 6/28

[Summary]
cust states that they and no one in the household ever
ordered those ppv movies.cust requesting credit of
$35.80.

[Box Verification by Customer]
2,SABKDTHBF,Yes,Yes,Yes,Yes

[MD Page ID]
1

[Control Number]
651789

Aug 9 '06 #1
2 1080
What exactly is your problem ?

"Eric" <eh******@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
>I try to insert some data in my table name customer(Customer_Name,
Street, Account_No) from data:
[Customer's Name]
[Street]
[Account Number]
How to i do that needs help
-----------------------------------------------------

Set con = Server.CreateObject("ADODB.Connection")
sConnection ="Provider=MSDASQL.1;Persist Security Info=False;Data
Source=emp1"
con.Open(sConnection)

Function EnumerateFolder( sFolder )
Dim fso, ts, data
Set fso = CreateObject("Scripting.FileSystemObject")
Set fol = fso.Getfolder ( server.mappath(sfolder) )
For each fil in fol.files
Set customer = CreateObject("Scripting.Dictionary")
Set ts = fil.openastextstream(1)
ary = Split(ts.ReadAll(),"[")
ts.Close
For i = 1 to Ubound(ary)
data = Split(ary(i),"]")
customer.Add data(0), data(1)
Next
next
End Function

EnumerateFolder "c:\txt"

Function test(s)
Select Case s

Case "[Dat"
test = True

Case "[Nov"
test = True

Case "[Sub"
test = True

Case "[Cus"
test = True

Case "[Str"
test = True

Case "[Cit"
test = True

Case "[Acc"
test = True

Case "[Ins"
test = True

Case "[Las"
test = True

Case "[PPV"
test = True

Case "[Mon"
test = True

Case "[Cur"
test = True

Case "[Typ"
test = True

Case "[Lan"
test = True

Case "[CRC"
test = True

Case "[Eve"
test = True

Case "[Sum"
test = True

Case "[Box"
test = True

Case "[MD"
test = True

Case "[Con"
test = True

End Select
End Function

-----SAMPLE DATA-----
[Date]
Sat Aug 05 14:06:12 EDT 2006

[Novell ID]
NSMITH4

[Subject]
PPV / VOD Research - Dispute - 1st Time - 711579

[Customer's Name]
EDWARD CAMPBELL

[Street]
5 WHEELER AVE APT 2

[City, State, Zip]
BRIDGEPORT CT, 06606

[Account Number]
006-0416-08

[Install Date]
06/21/2001

[Last Known Event Date]
06/29/2006

[PPV Hold]
No

[Monthly Rate]
186.52

[Current Services]
Optimum Voice
OOL FamilyorAbv
OR$20Discount
iO Silver Pkg
iO Box
PPOF
Addset: C/Rdy
OV World Call
OV Ported Number

[Type of Request]
Dispute - 1st Time

[Language]
English

[CRC PIN Instructions]
Yes

[Event Numbers/Date Range]
#77922 6/29, #78306 6/29, #77716 6/28, #77312 6/28

[Summary]
cust states that they and no one in the household ever
ordered those ppv movies.cust requesting credit of
$35.80.

[Box Verification by Customer]
2,SABKDTHBF,Yes,Yes,Yes,Yes

[MD Page ID]
1

[Control Number]
651789

Aug 10 '06 #2
How to i insert these values into access table?
Eric wrote:
I try to insert some data in my table name customer(Customer_Name,
Street, Account_No) from data:
[Customer's Name]
[Street]
[Account Number]
How to i do that needs help
-----------------------------------------------------

Set con = Server.CreateObject("ADODB.Connection")
sConnection ="Provider=MSDASQL.1;Persist Security Info=False;Data
Source=emp1"
con.Open(sConnection)

Function EnumerateFolder( sFolder )
Dim fso, ts, data
Set fso = CreateObject("Scripting.FileSystemObject")
Set fol = fso.Getfolder ( server.mappath(sfolder) )
For each fil in fol.files
Set customer = CreateObject("Scripting.Dictionary")
Set ts = fil.openastextstream(1)
ary = Split(ts.ReadAll(),"[")
ts.Close
For i = 1 to Ubound(ary)
data = Split(ary(i),"]")
customer.Add data(0), data(1)
Next
next
End Function

EnumerateFolder "c:\txt"

Function test(s)
Select Case s

Case "[Dat"
test = True

Case "[Nov"
test = True

Case "[Sub"
test = True

Case "[Cus"
test = True

Case "[Str"
test = True

Case "[Cit"
test = True

Case "[Acc"
test = True

Case "[Ins"
test = True

Case "[Las"
test = True

Case "[PPV"
test = True

Case "[Mon"
test = True

Case "[Cur"
test = True

Case "[Typ"
test = True

Case "[Lan"
test = True

Case "[CRC"
test = True

Case "[Eve"
test = True

Case "[Sum"
test = True

Case "[Box"
test = True

Case "[MD"
test = True

Case "[Con"
test = True

End Select
End Function

-----SAMPLE DATA-----
[Date]
Sat Aug 05 14:06:12 EDT 2006

[Novell ID]
NSMITH4

[Subject]
PPV / VOD Research - Dispute - 1st Time - 711579

[Customer's Name]
EDWARD CAMPBELL

[Street]
5 WHEELER AVE APT 2

[City, State, Zip]
BRIDGEPORT CT, 06606

[Account Number]
006-0416-08

[Install Date]
06/21/2001

[Last Known Event Date]
06/29/2006

[PPV Hold]
No

[Monthly Rate]
186.52

[Current Services]
Optimum Voice
OOL FamilyorAbv
OR$20Discount
iO Silver Pkg
iO Box
PPOF
Addset: C/Rdy
OV World Call
OV Ported Number

[Type of Request]
Dispute - 1st Time

[Language]
English

[CRC PIN Instructions]
Yes

[Event Numbers/Date Range]
#77922 6/29, #78306 6/29, #77716 6/28, #77312 6/28

[Summary]
cust states that they and no one in the household ever
ordered those ppv movies.cust requesting credit of
$35.80.

[Box Verification by Customer]
2,SABKDTHBF,Yes,Yes,Yes,Yes

[MD Page ID]
1

[Control Number]
651789
Aug 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Sans Spam | last post by:
Greetings! I have a table that contains all of the function permissions within a given application. These functions are different sections of a site and each has its own permissions (READ, WRITE,...
6
by: Mark P | last post by:
Some time ago I posted here about inserting into a set with a hint: ...
6
by: pk | last post by:
Sorry for the piece-by-piece nature of this post, I moved it from a dormant group to this one and it was 3 separate posts in the other group. Anyway... I'm trying to bulk insert a text file of...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
16
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the...
4
by: authorking | last post by:
I use the following code to insert a data record in to a datatable of an access database.But every time I execute the command, there will rise an exception and the insert operation can't be...
2
by: Polyhedron_12 | last post by:
I am having problems calling functions in general in VB. I keep getting alot of errors. Can anybody help me out with this? I put the error message on the same line that it says it is at. I believe...
2
by: Geoffrey KRETZ | last post by:
Hello, I'm wondering if the following behaviour is the correct one for PostGreSQL (7.4 on UNIX). I've a table temp_tab with 5 fields (f1,f2,f3,...),and I'm a launching the following request :...
2
by: wombat53 | last post by:
Hi Group Are there any DB2 UDB ESE DPF V8.2 users exploiting "buffered inserts" (BIND parm INSERT BUF) *and* "multi-row INSERTS" (many rows associated with the VALUES clause of the INSERT to...
6
by: rn5a | last post by:
During registration, users are supposed to enter the following details: First Name, Last Name, EMail, UserName, Password, Confirm Password, Address, City, State, Country, Zip & Phone Number. I am...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.