473,657 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with Data in VS2008 Web Developer

Ty
I'm using Web Developer in VS 2008.

I have a MS Access DB that I want access the data to place into labels
and fill dropdown list boxes.

The problem is that I am use to VB 6 and ADO where I could just code
it without much fuss.

Now the issues I have are....

1. Where do I place the code? In the aspx page as VBscript or in the
apsx.vb page as code?

I looked on the web and I find that the recordset object has been
replaced with the dataset. There is also a dataadapter needed to fill
the dataset. None of it makes much sense to me. I added a dataset to
my site by add new item...dataset and used the wizard to connect to
the database and the query builder to fill data from the table but how
do i use this in the aspx pages? and Do I have to add a new one for
each table I need to access for different pages?

Most of the examples I have seen use a SQL database and I cannot see
how to change it to my use.

Any help or a simple example of creating a connection, command and
getting the data into variables would be greatly appreciated.

I have been able to use a gridview with accessdatasourc e without issue
but the data I need to input now is into controls that do not have a
data bound property such as a label and textbox.

Thanks,

Ty

Mar 24 '08 #1
5 1242
MDB is obsolete.

Seriously WTF Is wrong with your decision-making abilities?

If you want to change a SQL Server database; you should probably find
'SQL Server Management Studio Express'.

THanks

-Aaron

On Mar 24, 8:23*am, Ty <tbar...@lewist ownhospital.org wrote:
*I'm using Web Developer in VS 2008.

I have a MS Access DB that I want access the data to place into labels
and fill dropdown list boxes.

The problem is that I am use to VB 6 and ADO where I could just code
it without much fuss.

Now the issues I have are....

1. Where do I place the code? In the aspx page as VBscript or in the
apsx.vb page as code?

I looked on the web and I find that the recordset object has been
replaced with the dataset. There is also a dataadapter needed to fill
the dataset. None of it makes much sense to me. I added a dataset to
my site by add new item...dataset and used the wizard to connect to
the database and the query builder to fill data from the table but how
do i use this in the aspx pages? and Do I have to add a new one for
each table I need to access for different pages?

Most of the examples I have seen use a SQL database and I cannot see
how to change it to my use.

Any help or a simple example of creating a connection, command and
getting the data into variables would be greatly appreciated.

I have been able to use a gridview with accessdatasourc e without issue
but the data I need to input now is into controls that do not have a
data bound property such as a label and textbox.

Thanks,

Ty
Mar 24 '08 #2
On Mar 24, 11:23 am, Ty <tbar...@lewist ownhospital.org wrote:
I'm using Web Developer in VS 2008.

I have a MS Access DB that I want access the data to place into labels
and fill dropdown list boxes.

The problem is that I am use to VB 6 and ADO where I could just code
it without much fuss.

Now the issues I have are....

1. Where do I place the code? In the aspx page as VBscript or in the
apsx.vb page as code?

I looked on the web and I find that the recordset object has been
replaced with the dataset. There is also a dataadapter needed to fill
the dataset. None of it makes much sense to me. I added a dataset to
my site by add new item...dataset and used the wizard to connect to
the database and the query builder to fill data from the table but how
do i use this in the aspx pages? and Do I have to add a new one for
each table I need to access for different pages?

Most of the examples I have seen use a SQL database and I cannot see
how to change it to my use.

Any help or a simple example of creating a connection, command and
getting the data into variables would be greatly appreciated.

I have been able to use a gridview with accessdatasourc e without issue
but the data I need to input now is into controls that do not have a
data bound property such as a label and textbox.

Thanks,

Ty
First, go here and get your connection string for Access:

www.connectionstrings.com

Then, you can try this code (typed in message so watch out for errors)
and loop through the data returned from a query.

/////////////
'// Add to the top of the code file:
'// Imports System.Data.Ole Db

Using conn As New OleDbConnection ("your connection string from
www.connections trings.com")
Using com As OleDbCommand = conn.CreateComm and()
conn.Open() '// If you fail here your conn string is probably
wrong

com.CommandType = CommandType.Tex t
com.CommandText = "SELECT Name FROM tbl_Names"

Using dr As OleDbDataReader = com.ExecuteRead er()
While dr.Read()
Dim name As String = dr("Name").ToSt ring()

Me.listBox1.Ite ms.Add(name)
End While
End Using
End Using
End Using
///////////////

Let me know how well it goes, I typed that really quick.

Thanks,

Seth Rowe [MVP]
Mar 24 '08 #3
Ty
On Mar 24, 12:03*pm, "aaron.ke...@gm ail.com" <aaron.ke...@gm ail.com>
wrote:
MDB is obsolete.

Seriously WTF Is wrong with your decision-making abilities?

If you want to change a SQL Server database; you should probably find
'SQL Server Management Studio Express'.

THanks

-Aaron
There really is no reason to be rude!

I'm using Access for testing and learning because thats what the DB
was written in. I will later have to convert it to SQL Server but at
this time it is not my decision to make.

You comments are neither helpful or necessary. Unless you have
something helpful to the questions I asked please refrain from posting
your dribble.

Ty

Mar 25 '08 #4
Ty
First, go here and get your connection string for Access:

www.connectionstrings.com

Then, you can try this code (typed in message so watch out for errors)
and loop through the data returned from a query.

/////////////
'// Add to the top of the code file:
'// Imports System.Data.Ole Db

Using conn As New OleDbConnection ("your connection string fromwww.connect ionstrings.com" )
* * Using com As OleDbCommand = conn.CreateComm and()
* * * * conn.Open() '// If you fail here your conn string is probably
wrong

* * * * com.CommandType = CommandType.Tex t
* * * * com.CommandText = "SELECT Name FROM tbl_Names"

* * * * Using dr As OleDbDataReader = com.ExecuteRead er()
* * * * * * While dr.Read()
* * * * * * * * Dim name As String = dr("Name").ToSt ring()

* * * * * * * * Me.listBox1.Ite ms.Add(name)
* * * * * * End While
* * * * End Using
* * End Using
End Using
///////////////

Let me know how well it goes, I typed that really quick.

Thanks,

Seth Rowe [MVP]- Hide quoted text -

- Show quoted text -
Thanks Seth thats exactly what I needed to get started and build upon.

Ty
Mar 25 '08 #5
Access isn't easier for testing with!!!

Do you rewrite your underwear twice a day?

I don't mean to be rude-- I just think that there is a better way than
always rewriting Access databases.. because they're not reliable--
they don't scale. and they're just 'not good enough' for real world
usage.

-Aaron

On Mar 25, 3:13*am, Ty <tbar...@lewist ownhospital.org wrote:
On Mar 24, 12:03*pm, "aaron.ke...@gm ail.com" <aaron.ke...@gm ail.com>
wrote:
MDB is obsolete.
Seriously WTF Is wrong with your decision-making abilities?
If you want to change a SQL Server database; you should probably find
'SQL Server Management Studio Express'.
THanks
-Aaron

There really is no reason to be rude!

I'm using Access for testing and learning because thats what the DB
was written in. I will later have to convert it to SQL Server but at
this time it is not my decision to make.

You comments are neither helpful or necessary. Unless you have
something helpful to the questions I asked please refrain from posting
your dribble.

Ty
Mar 25 '08 #6

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

Similar topics

4
3325
by: Lamont Sanford | last post by:
Could someone please explain why I as a Visual Studio 2008 user (WPF) would want the Expression Blend product? What does Blend offer that VS2008 does not? As far as I can tell, both products can be used to design WPF applications -- but the former seems geared toward designers rather than programmers. Would I, as the C# programmer, give Blend to my designer to construct the user interface? ...just trying to figure out the division of...
7
1740
by: Academia | last post by:
I don't understand the Enterprise editions that MS gives away. If I only write VB what is the difference between buying and using VS2008 and downloading and using the VB enterprise edition? If I write a solution containing VB and C# what is the difference?
20
2880
by: Iouri | last post by:
Hi everybody, We are currently using VS2003 and now we are in the porcess of upgrading to the next Visual Studio version. Does somebody have a real life experience with VS2008? My boss wants to go with VS2005 and I am trying to convince to buy VS2008. Can somebody provide links to compare 2 products in terms of how stable they are. I do not need VS2008 new features, I need to prove to my management that VS2008 is a stable product. TIA
3
1380
by: GaryDean | last post by:
Is there any possible downside of completely replacing VS2005 with VS2008 willy-nilly? Shouldn't it work with all of my 2.0 projects and websites? (I have MSDN vs2008 DVD (disk 4400)) Thanks, Gary
7
2308
by: dan | last post by:
I'm working on a small Web project in VS2008. In VS2005 it was recommended that DataSet be placed in App_Data folder (the framework did that automatically). In VS2008 the framework does not give me that option. The Add.New Item in the App_Data context menu does not even list the DataSet. Does anyone know what is behind the change and what the recommended practice is? Thanks.
4
554
by: K Viltersten | last post by:
We have a project working well today and it's developed on VS2005. Since we're planing to switch to VS2008 in a soon future, i've been trying to move the project to VS2008 Express (Web Developer). After i've moved over all the files, i run into problems compiling and running it. Both versions of VS are run on the same computer (with the sam settings, of course). Still, when i try to run index.aspx, i get error message as follows:
16
2307
by: Harry Simpson | last post by:
I've been away from ASPNET - I open up a new Web app in VS2008 and go into properties and select to use IIS instead of the personal web server. Then I run in debug mode and it says I have to set the Debug= True in the Web.config which I do. Then try to run it again and it says I must enable integrated security which I do. I then try to run it again and get the HTTP 403 error - " This error (HTTP 403 Forbidden) means that Internet...
12
9755
by: Justin | last post by:
Ok, I give up. I can't seem to construct a decent (productive) way of sorting my arraylist. I have a structure of two elements: Structure TabStructure Dim TabName As String Dim FullFilePath As String End Structure
3
5799
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, There is a fatal error while installing VS2008 SP1 on Vista 64bit Business edition. The last line of error log is Installation failed with error code: (0x80070643) I tried to uninstall Silverlight first (which is described in some blogs) and install .NET framework 3.5 SP1 manually but still failed. My VS2008 is Team Suit for developer and Vista SP1 is also installed.
0
8402
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
8829
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...
1
8508
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
8608
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
7341
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
5633
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
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2733
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
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.