PC Review


Reply
Thread Tools Rate Thread

Data Access Application Block and listbox

 
 
=?Utf-8?B?YW1iZXI=?=
Guest
Posts: n/a
 
      2nd Mar 2004
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"
 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      2nd Mar 2004
Hi,

Try this.

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

Ken
---------------
"amber" <(E-Mail Removed)> wrote in message
news:715A9C90-CD92-46A9-AF37-(E-Mail Removed)...
> 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"



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      2nd Mar 2004
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.




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Access Application Block Alphonse Giambrone Microsoft ASP .NET 2 18th Sep 2005 01:41 PM
Data Access Application Block =?Utf-8?B?TWFyaw==?= Microsoft ADO .NET 5 11th Mar 2004 10:44 AM
Data Access Application Block ? Rajesh Madhra Microsoft ADO .NET 3 14th Jul 2003 07:07 PM
Re: Data Access Application Block ? fadi Microsoft ASP .NET 0 14th Jul 2003 02:25 PM
Data Access Application Block ? Rajesh Madhra Microsoft ASP .NET 1 9th Jul 2003 10:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 PM.