473,385 Members | 1,814 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.

Data Access Application Block and listbox

Hello
I'm using the Data Access Application Block in my code
I'm trying to populate a list box
It works right up to the last step - displaying the datamember
Can someone tell me where the problem lies
Thanks in advance
Ambe

My code is as follows

Dim ConStr As String = "workstation id=LAPTOPAMBER;packet size=4096;integrated security=SSPI;initial catalog=fsAbitibi;persist security info=False
Dim dsACP As DataSet = SqlHelper.ExecuteDataset(ConStr, CommandType.Text,
"SELECT ID_CUTTING_PERMIT, STR_CUTTING_PERMIT, STR_FOREST_DISTRICT, STR_FOREST_REGION, STR_TSA, STR_LICENSEE, STR_LICENSE_NO, STR_OPERATING_AREA, STR_TIMBER_MARK, STR_CATEGORY, DTM_FORECAST, STR_EMPLOYEE, DTM_COMPLETE, STR_SIGN_OFF_BY, DTM_SIGN_OFF, STR_PEER_REVIEW, DTM_PEER_REVIEW, STR_SIGN_OFF_STATUS, STR_SIGN_OFF_COM FROM TDT_CUTTING_PERMIT"

lBoxCP.DataSource = dsAC
lBoxCP.DisplayMember = "TDT_CUTTING_PERMIT.STR_CUTTING_PERMIT"
Nov 20 '05 #1
2 1080
Hi,

Try this.

lBoxCP.DataSource = dsACP.Tables(0)
lBoxCP.DisplayMember = "STR_CUTTING_PERMIT"

Ken
---------------
"amber" <an*******@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com...
Hello,
I'm using the Data Access Application Block in my code.
I'm trying to populate a list box.
It works right up to the last step - displaying the datamember.
Can someone tell me where the problem lies?
Thanks in advance!
Amber

My code is as follows:

Dim ConStr As String = "workstation id=LAPTOPAMBER;packet size=4096;integrated security=SSPI;initial catalog=fsAbitibi;persist
security info=False" Dim dsACP As DataSet = SqlHelper.ExecuteDataset(ConStr, CommandType.Text, _ "SELECT ID_CUTTING_PERMIT, STR_CUTTING_PERMIT, STR_FOREST_DISTRICT, STR_FOREST_REGION, STR_TSA, STR_LICENSEE,
STR_LICENSE_NO, STR_OPERATING_AREA, STR_TIMBER_MARK, STR_CATEGORY,
DTM_FORECAST, STR_EMPLOYEE, DTM_COMPLETE, STR_SIGN_OFF_BY, DTM_SIGN_OFF,
STR_PEER_REVIEW, DTM_PEER_REVIEW, STR_SIGN_OFF_STATUS, STR_SIGN_OFF_COM FROM
TDT_CUTTING_PERMIT")
lBoxCP.DataSource = dsACP
lBoxCP.DisplayMember = "TDT_CUTTING_PERMIT.STR_CUTTING_PERMIT"

Nov 20 '05 #2
Cor
Hi Amber,

Did you know about this chat tonight (for me)

Wondering about how best to access data from your applications? Then bring
your questions and ask them to experts from the Visual Studio and SQL teams.
Come learn about the best approaches for working with data in your
applications.

Date:
March 2, 2004

Time:
1:00 - 2:00 P.M. Pacific time
4:00 - 5:00 P.M. Eastern time
21:00 - 22:00 BST/BST
(For a list of local time zones relative to GMT, please see
http://msdn.microsoft.com/chats/timezones.asp.)

Outlook Reminder:
http://msdn.microsoft.com/chats/outl...rs/VS_Mar2.vcs

Location:
http://msdn.microsoft.com/chats (then click the name of the chat to enter
the chat room)

For more information about Visual Basic .NET, see
http://msdn.microsoft.com/vbasic/
To see a list of upcoming chats or set a reminder for this chat, see
http://msdn.microsoft.com/chats.
For archives of previous chats, see
http://msdn.microsoft.com/chats/recent.asp.

Thanks!
Jason Cooke
VB.NET Team
========
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
(c) 2004 Microsoft Corporation. All rights reserved.


Nov 20 '05 #3

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

Similar topics

1
by: Özgür Aytekin | last post by:
Hello NG Is DAAB 3.1 the offical replacement of Microsoft Data Access Application Block 2.0? DAAB 3.1 download:...
2
by: Joe Bloggs | last post by:
I have a general question on best practice regarding data access. I have the code below, a static method defined in a class that I use in a data layer dll. The method takes a string as its...
0
by: ad | last post by:
I have used Data Application Access Block2 in my web application. Now I download the Library Data Access Application Block. and read the document. May be I am stupid, I can't migrate it to...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
1
by: EO | last post by:
I am trying to use the MSFT data access application block on 3 machines. Machine 1: Sandbox environment; I installed the application block with the msi. The Sqlhelper class compiles & runs...
6
by: Jonathan Crawford | last post by:
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473 Hi I have installed the enterprise library on a development machine and created a project on our webserver. When...
6
by: Mukesh | last post by:
Hi I have Microsoft Enterprise Library 2005 installed on my local system. I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql Server 2000. I am developing a web application...
3
by: Mukesh | last post by:
Hi all As per my earlier conversation with Ciaran (thx for reply) I have installed the MS APplication block on the server , when i ran Build Enterprise Library file and Install Services from...
5
by: rn5a | last post by:
I have a ASPX page which has a ListBox & a Button. The ListBox lists all the files & directories existing in a directory on the server. I want to give users the option to download files from the...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...

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.