473,396 Members | 1,898 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,396 software developers and data experts.

populating an access database used for ASP.net website...

RAB
I want to populate my access database with strings which are coded as
follows:

{
{"string1"},
{"string2"},
{"string3"},
......
{"string100"},
{"string101"},
}

I have 200 of these string lists that I want to populate an access data
base. I am building a website using ASP.net.

Without having to copy and paste each string individually, is there
anything I could do that would be simpler and faster?

Thanks,
RABMissouri

Nov 19 '05 #1
4 976
Do each of these strings belong in the same field (ie: one row per string) or
the same row (one field per row).

The first is safer for what I'm about to describe, because then you don't
have to worry about the data matching up, but either is fine.

You can write something like:
int i = 0;
foreach(string strValue in array)
{
this.AddValue(strValue);
//dSet[0][i] = strValue;
//i++;
}
//this.UpdateData(dSet);

Hope that helps,

Jason Lind

"RAB" wrote:
I want to populate my access database with strings which are coded as
follows:

{
{"string1"},
{"string2"},
{"string3"},
......
{"string100"},
{"string101"},
}

I have 200 of these string lists that I want to populate an access data
base. I am building a website using ASP.net.

Without having to copy and paste each string individually, is there
anything I could do that would be simpler and faster?

Thanks,
RABMissouri

Nov 19 '05 #2
"RAB" wrote:
I want to populate my access database with strings which are coded as
follows:

{
{"string1"},
{"string2"},
{"string3"},
......
{"string100"},
{"string101"},
}

I have 200 of these string lists that I want to populate an access data
base. I am building a website using ASP.net.

Without having to copy and paste each string individually, is there
anything I could do that would be simpler and faster?

Thanks,
RABMissouri


you can always create a for cicle to do that

for x=0 to 200
insert "string" & x
next
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 19 '05 #3
RAB
Is this code using VB?

Would you sample code be part of the SQL statement?

Thanks,
RABMissouri


MamaKike wrote:
"RAB" wrote:
I want to populate my access database with strings which are coded as
follows:

{
{"string1"},
{"string2"},
{"string3"},
......
{"string100"},
{"string101"},
}

I have 200 of these string lists that I want to populate an access data
base. I am building a website using ASP.net.

Without having to copy and paste each string individually, is there
anything I could do that would be simpler and faster?

Thanks,
RABMissouri


you can always create a for cicle to do that

for x=0 to 200
insert "string" & x
next
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com


Nov 20 '05 #4
I'm going to try to put an example

Imagine that you have a database table named xpto with only a field
named exp. And you want to write in exp your strings
string1....string200

dim dtaConnection as New SqlConnection("integrated security=SSPI;data
source=(local);persist security info=False;initial catalog=xpto")
dim strSql as string
Dim comand As New SqlCommand(strSQL, dtaConnection)
comand.CommandType = CommandType.Text

dtaConnection.Open()
for i as integer=0 to 200
sql="Insert into exp values (" & i &")"
comand.ExecuteNonQuery()
next
dtaConnection.Close()


to use oledb change SQL to oledb

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 20 '05 #5

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

Similar topics

4
by: Bob S. | last post by:
I am trying to decide whether or not to upgrade to Access 2003 from 2002 but I'm having a difficult time weighing the options. Has anyone already upgraded to Access 2003? Is there much difference...
3
by: ssb | last post by:
Hello, This may be very elementary, but, need help because I am new to access programming. (1) Say, I have a column EMPLOYEE_NAME. How do I fetch (maybe, cursor ?) the values one by one and...
4
by: et | last post by:
I have an aspnet program that uses an Access database -- I won't go into why I'm using Access -- and can't get it to run in share mode. If I have opened the website, and I try to edit the...
7
by: Visitor No 3 | last post by:
My local Crinkles group(U3A), of which I am one, want me to develop a noddy database and web site for their members. Some are computer literate, others not so. I thought an Access 2000 .mdb on a...
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
21
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a...
16
by: Head In A Pan | last post by:
OK... I am now heading into day 3 of attempting to populate a database through my flash form!! I figure I need some help before I crack! I just can't get it to work at all... I am able to get...
3
by: Nathan Sokalski | last post by:
When I attempt to access a Microsoft Access database from my website, I recieve the following error: Server Error in '/' Application....
0
by: Nymus | last post by:
I would like to use an access database as a shared database on a remote website. I don't know if it is possible, but this is what i would like to do with this database: - Use it to run a database...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.