473,811 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\pictur e.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 3161
Why don't you just concatenate the string values:

stringFullFileP ath = 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\pictur e.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:

stringFullFileP ath = 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\pictur e.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 FolderBrowserDi alog1

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.co m> wrote in message
news:eB******** ******@TK2MSFTN GP09.phx.gbl...
Why don't you just concatenate the string values:

stringFullFileP ath = 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\pictur e.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 FolderBrowserDi alog1

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.co m> wrote in message
news:eB******** ******@TK2MSFTN GP09.phx.gbl...
Why don't you just concatenate the string values:

stringFullFileP ath = 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\pictur e.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
473
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 in dataset, I displayed all files in listbox.(for preview), that works.
2
4030
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 looks fine in a datagrid (5 columns and 5,000 rows), but I've been trying, without success, to then insert the resulting dataset called "result" into a single sql table that has an auto-increment and PK column called ID,
2
4588
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 is a piece of my code: Try Me.SqlInsertCommand1.CommandText = "INSERT INTO StudentInfo(STUDENTID, SURNAME, FIRST_NAMES, PASSWORD, GENDER, RESIDENCE) VALUES(' " & sNumber.Text & " ' ,' " &
6
2060
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 dataadapter to update the records in database. Records are inserting but all the five records have the same value and that too of that last ones.. More over i tried to use the acceptchanges methods for datatable and dataset but of no use
3
1137
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 make a watch when I'm merely asking what time it is. Dim thisDataAdapter As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Sessions", OleDbConnection1)
0
890
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 i 1. Client_RS.HasChanges(DataRowState.Modified), update the dataset with the amended data and pass that through to the SQL server. Can this be done through the dataset
0
1178
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 written, but Its not working for me...
3
3369
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 records to a data base,for which i am using Typed dataSet.(I used DataSet Designer to create one) Then created a table adapter in which i have written query for INSERT , & set Database Direct property to true.(I didnt use a seperate methods for...
0
2232
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. it urgent i submit this application. when it runs it gives: this OdbcTransaction has completed,it no longer usable. thx toyin here is the code Sub ProcessAllSynchOperations() Dim sSourceURL, sWebSiteIP As String Dim...
10
14216
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 last_run = '" & nowTime & "', event_action =1, event_time = '" & nextPollTime & "' where event_id = " & IntEventID
0
9728
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10648
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.