|
No, it's not. If you post a question in multiple forums, you can get different answers, which isn't really a good thing. You're taking away a continuity of discussion, where the good answers are weeded out from bad ones, and more detail required of the OP is lost in one discussion, but exists in another, leading to misinformation on one discussion thread.
|
|
|
|
|
Hi to all,
In Gridview i added the text as No Data Found in EmptyDataText Property of a gridview.
it is working fine when there is no data it should display that message but initially
when page is displayed
that time No data found is displayed which should not happen.
When we select Territory Name & Click on View Button that time that gridview is display
and shows all territories if not available then No Data Found .
Please suggest me how to solve this gridview problem
|
|
|
|
|
Why not set the emptydatatext property at runtime then you control the information it displays.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you set this property at design-time, then run your app, of course this is going to be displayed before you bind the grid to a dataset. Set the property only after you do a fetch and return no, or incomplete, results.
|
|
|
|
|
Hello friends,
In my MS access application,i want to move Subfolers from a folder across network using VBA.
I used the below code to move subfolders and files from one folder to another.
Dim fso, fld, subf
Set fso = CreateObject("Scripting.FileSystemObject")
Set fld = fso.GetFolder("C:\Hold\")
For Each subf In fld.SubFolders
subf.Move "c:\Data\"
subf.Delete True
Next
Set fld = Nothing
Set fso = Nothing
But these won't work , if the folder is across network. Getting "permission denied" error..
How can i move subfolders and files across network
modified on Tuesday, November 18, 2008 3:12 AM
|
|
|
|
|
jishbalan wrote: But these won't work , if the folder is across network. Getting "permission denied" error..
Did you read the documentation on the FileSystemObject?? If not, I highly suggest doing so.
You got the permission denied error either because you don't have write/create permissions in the target directory, or the target directory files/folders are ReadOnly and you're trying to overwrite them.
|
|
|
|
|
Hi everyone
How can I use a datagridview in vb.net with middle-tier business logic to pass data for Insert, Update and Delete operations. My BLL and DAL are completed, but I don't know how to pass the data from datagridview back to the BLL. I have set the datagridview by passing a dataset to read data through BLL/DAL but do not know how to use for CUD operations.
Your help please
|
|
|
|
|
When the CRUD operations are completed on the DGV you need to pass the datasource (table) back to your BLL. Your BLL then needs to inspect the rowstate for each row and deal with it appropriately.
I never allow CRUD in any grid control, I always force the user to double click a row and open a dialog to do the CRUD. This allows much finer control and reduces a lot of the angst of using grids. You can then reload the grid table from the database or duplicate the changes in the grids underlying datatable (I almost always reload).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Buddy
I'll try this and thanks for the advice too
|
|
|
|
|
|
Thank you for the spetp by step instructions, this was really help full for me.
|
|
|
|
|
Am Glad it Helped.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi Vuyiswa
I have the BLL and DAL all in codes in class objects. Although I have managed to convert your design time controls like datasets and adapters to codes. I am having difficulty in making the following CheckRules codes to work with my datasets in class objects.
I understand the DAL is Prop_DAL but don't know what to substitue for dsProperty and also Dim row As Prop_DAL.dsProperty.ClientsRow
Can you please clear out this for me.
Private Sub CheckRules(ByVal dsdata As Prop_DAL.dsProperty)
Dim strMsg As String
Dim row As Prop_DAL.dsProperty.ClientsRow
'Iterating through the Dataset and Checking the Rules
For Each row In dsdata.Clients.Rows
If row.RowState = DataRowState.Added Or _
row.RowState = DataRowState.Modified Then
'Start Checking the Rules now
If row.Client_Name.Trim = "" Then
MsgBox("Name Cannot be Empty")
End If
If row.Client_Address = "" Then
MsgBox("Address Cannot be Empty")
End If
If row.Client_ID.ToString.Length > 13 Then
MsgBox("ID number must less than 13")
End If
End If
Next
If strMsg <> "" Then
'throw a new ApplicationException
'with our Custom Error message in it
Throw New ApplicationException(strMsg)
End If
End Sub
|
|
|
|
|
hi Galle
Sorry For a Late Answer, bussy uhh
, to Answer your Question Marks ("Nice English")
The Code Below was based on a Wizard. This was my First Demostration of the N-Tier, and from there i demostrated on how to code all that the wizard can do for you and do what the Wizard cannot do. Now i see you have a Problem interpreting this in vb.net , because i have written my other articles in C#.To go back to your Question
If you Look at the Following Code
Private Sub CheckRules(ByVal dsdata As Prop_DAL.dsProperty)
if i were to Write it Without a wizard, it would look like this
Private Sub CheckRules(ByVal dsdata As Dataset)
and in the Following, remember that my table name was Client name.
Dim row As Prop_DAL.dsProperty.ClientsRow
In this code , we are creating a row object. So the difference here is to create a row object and dont reference it to the DAL wizard Dataset.
Dim row as dsdata
Hope this Helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Thank you...
I did go through your C# codes and they are very good. Hey, your comments about my english "Nice English" was it a joke? I am not offended, if not so.
|
|
|
|
|
No its a Joke, In South Africa we have this Commedian who makes jokes about being a Priest. So he always breaks his English for the sake of his audience
Dont worry i wouldnt attempt to upset you
Am Glad you you got help from my code
Thank you
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Public Function Rating(ByVal iNPS As String, ByRef iRatings() As String) As String
Select Case iNPS
Case "1/2"""
iRatings = {"150#", "300#"} 'This is the line where I get an error
End Select
End Function
In the error list I get an "Expression Expected" error. I'm trying to return a string array so I can populate a combobox for a user. Any help would be much appreciated.
Eric.
|
|
|
|
|
Public Function Rating(ByVal iNPS As String, ByRef iRatings() As String) As String()
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Thank you for replying so quickly. I tried your suggestion and I still have the same problem. I am using vb.net express 2008. The blue squiggly line is under the first(opening) bracket.
|
|
|
|
|
Public Function Rating(ByVal iNPS As String, ByRef iRatings() As String) As String
Select Case iNPS
Case "1/2"
iRatings = New String() {"150#", "300#"}
End Select
End Function
|
|
|
|
|
You don't need to put a ByRef array in the header. You just need:
Public Function Rating(ByVal iNPS As String) As String()
Dim result As String()
Select Case iNPS
Case "1/2"""
result = New String() {"150#", "300#"}
.
.
.
End Select
Return result
End Function
|
|
|
|
|
I would like to known the name of an object that always appears describing a list of properties.
For example, when I am adding nodes to a treeview control it always appears an object that it's like a list box, but its categorized containg all the properties of each node.
I would like to use this object in my application, but I known even its name.Does anyone can help me?
Thanks,
Estevão
|
|
|
|
|
|
PropertyGrid[^]?
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
Yes thats the GridProperty control..thanks a lot!!!!
|
|
|
|