|
Hi,
Just make a join with the table which has Mr, Mrs, etc.. with this table like,
Select a.idfield, b.MrMrsfield as title, a.firstname, a.lastname, a.username
from nametable a, mrmrstable b
where a.idfield = b.idfield
and on the grid hide the idfield column, hope it makes sense for your requirement.
Ram
|
|
|
|
|
This makes complete sense.. Thank you for your replies.
There is something I'm missing tho. I will figure it out!
Thanks again.
|
|
|
|
|
I figured out what the problem was!
The BOUND COLUMNS in the datagrid were referring to the ID of Mr/Mrs.
Since I have made a qurey referring to the JOIN in the VIEW of both tables, I was able to point to the DESCRIPTION field of the TITLE table which holds the values Mr/Mrs.
In other words:
(COLUMN) DataField="Description" SortExpression="Description" HeaderText="Title"
(COLUMN) DataField="Forename" SortExpression="Forename" HeaderText="Forename"
(COLUMN) DataField="Surname" SortExpression="Surname" HeaderText="Surname"
(COLUMN) DataField="Username" SortExpression="Username" HeaderText="Username"
which work with the query: select * from VIEW_USER
I hope any who searches for an answer to this will find this post useful!
Thanks again.
|
|
|
|
|
Can anyone tell me what needs to be done to get the enterprise library
(june release) to work with VS 2005. I have changed the paths in the bat
files as reccomended in the following post
http://www.codeproject.com/dotnet/EntLibJune2005_VS2005.asp
and made all the changes but at runtime when calling
FormatData obj = Microsoft.Practices.EnterpriseLibrary.Configuration.ConfigurationManager.GetConfiguration("FormatSection") as FormatData;
I get the following error,
"Unrecognized attribute 'requirePermission'
(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machin e.config line
14)"
Any help would be appreciated
Praveen
|
|
|
|
|
Did you open the machine.config file and search for requirePermission. Remove that attribute or change it.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
I have got .netframework 1.1 and .netframework 2.0 installed on my machine.
I searched for machine.config for .netframework 2.0 and removed requirePermission attribute from it.
But it did not solve the problem, now it generates following error :
Unrecognized configuration section configProtectedData. (C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 97)
Praveen
|
|
|
|
|
Due to format like below, we are not able to save properly this information in SQL server 2000
Migración Líneas 1&2
Above information is saved as in SQL SERVER 2000
Migración sistema control Abelló Linde Alcalá
Can someone help me in this regard?
Thanks
Balasaheb
Software Developer
Platform: Asp.net,vb.net
Database: SQL Server 2000
|
|
|
|
|
Hi,
I am having problems looping through an array.
I have an arraylist, that has no values to it, once I start a while loop that fills a datareader. Once I get a specific value from a field in the database, I write that value to the arraylist. Once the reader is done, I also want to display the results from the arraylist in a label.
My code:
<br />
dim arrErrors as new Arraylist()<br />
<br />
While (objDr.Read())<br />
objInvoice = New Invoice()<br />
objInvoice.InvoiceDate = objDr(0).ToString<br />
objInvoice.InvoiceNumber = objDr(1).ToString<br />
objInvoice.InvoiceSubHead = objDr(2).ToString<br />
objInvoice.InvoiceTotal = objDr(3).ToString<br />
objInvoice.InvoiceSignoffBy = objDr(4).ToString<br />
objInvoice.InvoiceSubmittedBy = objDr(5).ToString<br />
<br />
<br />
If objInvoice.InvoiceSubmittedBy = "" Then<br />
arrErrors.Add("An error occured retrieving record" & objInvoice.InvoiceNumber)<br />
<br />
Else<br />
<br />
objInvoiceDetails.Add(objInvoice)<br />
End If<br />
<br />
End While<br />
'' I need code here to display the arraylist in an label<br />
<br />
Would really appreciate the help.
|
|
|
|
|
Dim intCount As Integer = 0
Do While intCount < arrErrors.Count
Me.Label1.Text += arrErrors(intCount).ToString
intCount += 1
Loop
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Thanks,
I have one more problem. I do the code in my data access layer. How can I display the arraylist on my aspx page? If I do the following, I still dont see the label with errors...
<br />
'label already in aspx page <br />
Dim lblShowDetails As Label<br />
<br />
Dim intCount As Integer = 0<br />
Do While intCount < arrErrors.Count<br />
lblShowDetails.Text += arrErrors(intCount).ToString<br />
intCount += 1<br />
Loop<br />
|
|
|
|
|
Are you getting any error or simply the data is not being displayed?
Best Regards,
Apurva Kaushal
|
|
|
|
|
No data is being displayed.
I am new to the 3-tier programming method.
Basically my app works as follows:
aspx.vb file
<br />
<br />
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
<br />
Dim strSuccess As String = Invoice.SelectInvoiceToAS400()<br />
<br />
If strSuccess = 1 Then<br />
lblSuccess.Text = "Successfully added to DB2"<br />
Else<br />
lblSuccess.text = "Unsuccessful entries"<br />
End If<br />
<br />
End Sub<br />
<br />
business tier
<br />
Public Shared Function SelectInvoiceToAS400() As Integer<br />
Return ExportXLSDA.SelectInvoiceToAS400()<br />
End Function
data access tier (in short)
<br />
Public Shared Function SelectInvoiceToAS400() As Integer<br />
<br />
Dim arrErrors As New ArrayList()<br />
<br />
Dim objInvoice As Invoice = Nothing<br />
<br />
'Create new dataset to hold information<br />
Dim objInvoiceDetails As New List(Of Invoice)()<br />
Dim objConn As SqlConnection = New SqlConnection(ConnectionString())<br />
Dim objCmd As SqlCommand = New SqlCommand("sp_SelectInvoiceDetails", objConn)<br />
<br />
'Mark the command as a TEXT Select<br />
objCmd.CommandType = CommandType.StoredProcedure<br />
<br />
'Open the connection<br />
<br />
objConn.Open()<br />
<br />
Try<br />
Dim objDr As SqlDataReader = objCmd.ExecuteReader()<br />
<br />
dim arrErrors as new Arraylist()<br />
<br />
While (objDr.Read())<br />
objInvoice = New Invoice()<br />
objInvoice.InvoiceDate = objDr(0).ToString<br />
objInvoice.InvoiceNumber = objDr(1).ToString<br />
objInvoice.InvoiceSubHead = objDr(2).ToString<br />
objInvoice.InvoiceTotal = objDr(3).ToString<br />
objInvoice.InvoiceSignoffBy = objDr(4).ToString<br />
objInvoice.InvoiceSubmittedBy = objDr(5).ToString<br />
<br />
<br />
If objInvoice.InvoiceSubmittedBy = "" Then<br />
arrErrors.Add("An error occured retrieving record" & objInvoice.InvoiceNumber)<br />
<br />
Else<br />
<br />
objInvoiceDetails.Add(objInvoice)<br />
End If<br />
<br />
End While<br />
<br />
Catch ex As Exception<br />
<br />
Dim strExceptionMsg As String = "Error Executing GetAS400InvoiceDetails(): " & ex.Message & "\r\n"<br />
Throw New Exception(strExceptionMsg, ex)<br />
<br />
Finally<br />
objConn.Close()<br />
<br />
End Try<br />
<br />
<br />
Dim intCount As Integer = 0<br />
Do While intCount < arrShowDetails.Count<br />
lblShowDetails.Text += arrShowDetails(intCount).ToString<br />
intCount += 1<br />
Loop<br />
<br />
Return 1<br />
<br />
End Function
|
|
|
|
|
You just check whether data is there in the arraylist or not.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Apurva Kaushal wrote: You just check whether data is there in the arraylist or not.
Ok, I am not sure what you mean by your post?
Can you maybe help me on how to return that array from my dataaccess layer to the aspx page?
|
|
|
|
|
You can send the arraylist as an object and then later cast it as per your requirement.
Best Regards,
Apurva Kaushal
|
|
|
|
|
If the lable exists on the page then the code should be
<br />
me.lblShowDetails.Text += arrErrors(intCount).ToString<br />
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
ToddHileHoffer wrote: me.lblShowDetails.Text += arrErrors(intCount).ToString
It would work if the array and label is on the same page, however the label is in my aspx.vb class, and the array in my datalayer. - basic 3 tier application.
|
|
|
|
|
OK, there are two ways you can handle this. Pass either the label object to the datalayer ByRef. Or return a string from the datalayer to your aspx.vb page. What is the problem?
-- modified at 10:50 Wednesday 23rd August, 2006
A thrid way would be to return the arraylist from your datalayer. If you don't know how to pass variables to and from classes you need to go open up a newb programming book. This is basic stuff man.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi,
I managed to return the array as a string from my datalayer to aspx page. Thanks for your help.
|
|
|
|
|
Hi
I'm getting a small problem. I've declared an array variable in javascript which is working fine if the script is with the aspx page. But when I'm separating the same javascript code to another file, then an script error occurs at the decalration location.
In the aspx page it was defined like this:
var Arr = new Array();
-------
-----
other functions-----
when transferring it to a separate javascript file say JavasS.js, it was written as the first line:
var Arr = new Array();
And then the other functions.
Previously it was working fine, but now its throwing javascript error at the said line.
What can be the reason and how to solve it?
Please help.
Thanks in advance.
Irshad Ahmad
|
|
|
|
|
It might be helpful to post the actual error you are getting.
only two letters away from being an asset
|
|
|
|
|
Hi All,
I got some problem with datagrid paging.
I want to show images in grid I did that.But now problem is that if image is having height 180 only two images should be in single page,if image is having height 60 only 6 images should be in single page and remaining should be on nextpage.
I mean I want to know how to set dynamic pagesize.Or any idea u can share with me to solve my problem.
Regards,
Nagraj
|
|
|
|
|
Hello
i'm making a webapplication using Asp.Net1.1 with vb.
By Using my Applicaton User Can Make his Site and Uploaded on his Server as well.
now i have to Monitor his Server by my Application that how many Disk Space he has been used if we allowed him 100 MB.
how can i do it.
thanx
|
|
|
|
|
hi
i installed iis in my system and test it by : http://localhost/localstart.asp and working correctly .
but when i create asp.net web site in VS2005 the following message shown me :
The site 'http://localhost/WebSite1' has not been configured for use with ASP.NET 2.0. Microsoft Visual Studio has been designed for use with ASP.NET 2.0; if not configured some features may make incorrect assumptions, and pages designed with the tool may not render correctly.
Would you like the site to be configured now?
and when i click Yes the follwing message shown me :
Configuring web site 'http://localhost/WebSite1' to ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly.
and when i compile my project by VS2005 the following message shown me :
Unable to start debugging on the web server. The server does not support debugging of ASP.NET or ATL Server applications. Click Help for more information on how to enable debugging.
You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.
How to Solve my Problem ??
|
|
|
|
|
I am not sure but if you try this,
Go to your IIS server and right click default website and choose properties.
for the tabs choose Asp.net tab
and check which version is there if its not version 2 or later then choose latest version from there . it may help.
thanks
Naveed Kamboh
|
|
|
|