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

Inserting record into dataset

ht
Hi!

i have a problem.
i'm using Visual Basic .Net 2003
Here's the thing.

I need to select one folder, without subdirs. (I know that)

For every file in that folder i need to create a record in dataset,
I displayed all files in listbox.(for preview), that works.
Here's the problem, I dont know insert statement
I need to insert string in a single record in a column, like this:

Location of the file and file name are two separate things, how do I put
them into one column ?

'C:\temp\picture.jpg'

When all files are loaded in, I wil make some changes in records and than
save it all to database.

Nov 22 '05 #1
6 3125
Why don't you just concatenate the string values:

stringFullFilePath = stringPath & "\" & stringFileName

"ht" <zo*******@vip.hr> wrote in message news:d8**********@ss405.t-com.hr...
Hi!

i have a problem.
i'm using Visual Basic .Net 2003
Here's the thing.

I need to select one folder, without subdirs. (I know that)

For every file in that folder i need to create a record in dataset,
I displayed all files in listbox.(for preview), that works.
Here's the problem, I dont know insert statement
I need to insert string in a single record in a column, like this:

Location of the file and file name are two separate things, how do I put
them into one column ?

'C:\temp\picture.jpg'

When all files are loaded in, I wil make some changes in records and than
save it all to database.

Nov 22 '05 #2
Why don't you just concatenate the string values:

stringFullFilePath = stringPath & "\" & stringFileName

"ht" <zo*******@vip.hr> wrote in message news:d8**********@ss405.t-com.hr...
Hi!

i have a problem.
i'm using Visual Basic .Net 2003
Here's the thing.

I need to select one folder, without subdirs. (I know that)

For every file in that folder i need to create a record in dataset,
I displayed all files in listbox.(for preview), that works.
Here's the problem, I dont know insert statement
I need to insert string in a single record in a column, like this:

Location of the file and file name are two separate things, how do I put
them into one column ?

'C:\temp\picture.jpg'

When all files are loaded in, I wil make some changes in records and than
save it all to database.

Nov 22 '05 #3
ht
I am using IO.FileInfo() for retreaving filename, wich does not returns
string value.
Directori path is given by FolderBrowserDialog1

So I got string value (path) and filename (IO type).
I want to write them to string variable (dim temp as string)

So i can value of temp write to column in record (witch is string)
Thanx

"David Young" <RE******************@yahoo.com> wrote in message
news:eB**************@TK2MSFTNGP09.phx.gbl...
Why don't you just concatenate the string values:

stringFullFilePath = stringPath & "\" & stringFileName

"ht" <zo*******@vip.hr> wrote in message
news:d8**********@ss405.t-com.hr...
Hi!

i have a problem.
i'm using Visual Basic .Net 2003
Here's the thing.

I need to select one folder, without subdirs. (I know that)

For every file in that folder i need to create a record in dataset,
I displayed all files in listbox.(for preview), that works.
Here's the problem, I dont know insert statement
I need to insert string in a single record in a column, like this:

Location of the file and file name are two separate things, how do I put
them into one column ?

'C:\temp\picture.jpg'

When all files are loaded in, I wil make some changes in records and than
save it all to database.


Nov 22 '05 #4
ht
I am using IO.FileInfo() for retreaving filename, wich does not returns
string value.
Directori path is given by FolderBrowserDialog1

So I got string value (path) and filename (IO type).
I want to write them to string variable (dim temp as string)

So i can value of temp write to column in record (witch is string)
Thanx

"David Young" <RE******************@yahoo.com> wrote in message
news:eB**************@TK2MSFTNGP09.phx.gbl...
Why don't you just concatenate the string values:

stringFullFilePath = stringPath & "\" & stringFileName

"ht" <zo*******@vip.hr> wrote in message
news:d8**********@ss405.t-com.hr...
Hi!

i have a problem.
i'm using Visual Basic .Net 2003
Here's the thing.

I need to select one folder, without subdirs. (I know that)

For every file in that folder i need to create a record in dataset,
I displayed all files in listbox.(for preview), that works.
Here's the problem, I dont know insert statement
I need to insert string in a single record in a column, like this:

Location of the file and file name are two separate things, how do I put
them into one column ?

'C:\temp\picture.jpg'

When all files are loaded in, I wil make some changes in records and than
save it all to database.


Nov 22 '05 #5
Zoltan,

And what is than wrong with the answer from David, I would have given the
same answer.

I think that we don't see your problem.
If you have the name in the listbox
You have the path,

In my opinion it is than only looping throug the listbox and do what David
wrote.
(The items are Datarowview when you are searching for that).

Cor
Nov 22 '05 #6
Zoltan,

And what is than wrong with the answer from David, I would have given the
same answer.

I think that we don't see your problem.
If you have the name in the listbox
You have the path,

In my opinion it is than only looping throug the listbox and do what David
wrote.
(The items are Datarowview when you are searching for that).

Cor
Nov 22 '05 #7

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

Similar topics

3
by: ht | last post by:
Hi! i have a problem. i'm using Visual Basic .Net 2003 Here's the thing. I need to select one folder, without subdirs. (I know that) For every file in that folder i need to create a record...
2
by: a | last post by:
NEW Post Here's my best guess at how to insert this dataset.... the code runs, but no new records are added to the sql table. I've read and split a delimited text file into a dataset. It...
2
by: sweetness | last post by:
I'm new to this and desperately need help, I'm trying to insert into an sql db and i have no idea what to do and why. i created an sqladapter, and an sqlconnection by dragging and dropping. this...
6
by: Pushpendra Vats | last post by:
Hi , I am trying to insert records into database. I am trying to write the following code. On button1 click event i am inserting five records and after that i am calling the update method of...
3
by: Curt Emich | last post by:
Can someone tell me specifically what's missing in this code so that it won't write the record into the database? Please, no references to lengthy, bloated, meandering articles telling me how to...
0
by: Peter Newman | last post by:
VB.net ( 2003 ) & SQL 2005 Thank you for all the help in navigating through the dataset using the CurrencyManager. However im now stuck on the next part , Updating, and addind records. how can...
0
by: hzgt9b | last post by:
Using VS2003, VB.NET, Here's some pseudo code that I'm trying to get to work... if <a specific record existsthen do nothing else <insert the specific record> Endif I've got the code...
3
by: Surya | last post by:
Dear All, I have problem on inserting a record to database..Although it looked easy.. i have caught up with following issue .. please go ahead and help me to find solution I Need to insert...
0
by: toyin | last post by:
hello, pls help look through this code its not inserting the record in dataset into the another database. i want to insert the row in the dataset into another table in another database. pls help....
10
by: Newbie | last post by:
howdy... i am trying to execute a statement where i insert a record with datetime values into a sql database. Dim sqlcmd As New SqlCommand sqlcmd.CommandText = "update tbl_event set...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.