1 Replies - 23265 Views - Last Post: 01 September 2008 - 04:15 PM Rate Topic: -----

#1 UD2008   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 31-August 08

Database with access 2007 in VB 2008

Post icon  Posted 01 September 2008 - 09:27 AM

Hi Guys

I'am kinda new to VB 2008 and I would like to have some help.

I'm creating a program with vb 2008, it's a program that should hold a database of songs (only title, genre, songtext and number).

I have created the graphic style already but now the database part is the most difficult part.

I have a search bar, and when a word from a song is typed in, you can search in the database and will display the songs with that word in a richtextbox.
When I select a song inside this richtextbox, displayed in a table (still need to create), the whole row should be selected instead of a single field.
When a songs is selected I can put the songtitle in an other richtextbox, from where I can send the list of songtitles I created through email to anyone I want or see the songtext.

How can I do this?

I hope I discribed it well.

Thanks already for any respons.

Is This A Good Question/Topic? 0
  • +

#4 Damage   User is offline

  • Lord of Schwing
  • member icon

Reputation: 300
  • View blog
  • Posts: 1,989
  • Joined: 05-June 08

Re: Database with access 2007 in VB 2008

Posted 01 September 2008 - 04:15 PM

we'd need to have all the details(like table and column names and the database location) but it should resemble something like this
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Music.accdb")

		Dim myadapter As New OleDbDataAdapter("SELECT * FROM tblSongs where SongName = '" & txtSongTitle.text & "'", conn)

		Dim dtset As New DataSet

		Dim table As DataTable = dtset.Tables(0)

	   RichTextBox1.Text = table.Rows(0).Item(0)
	   RichTextBox2.Text = table.Rows(0).Item(1)
	   RichTextBox3.Text = table.Rows(0).Item(2)


don't forget to include
Imports System.data
imports system.data.oledb

This post has been edited by Damage: 01 September 2008 - 07:11 PM

Was This Post Helpful? 1

Page 1 of 1