|
How do you mean ? There's properties to access both of those, and you can use a ToString overload to display just those values.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i got it by writing such as:
String.Format("{0:MM/yyyy}", DateTime.Now).ToString()
thanks fr ur help
Thanks in advance,
Priya.
|
|
|
|
|
Hi,
I am having MSFlexgrid with some contents from backend. In it at the last column at every row i need to add a checkbox over it. I tried with the following code. Its not throwing error. But i cannot see the checkbox. Please help me. And also i need to write a code when the checkboxes are select and click button it should do some things like "Accept" in backend.
Please help me. Its urgent.
MSFlexGrid1.Rows = rs.RecordCount
MSFlexGrid1.Cols = rs.Fields.Count + 1
Dim i, j As Integer
For i = 0 To rs.RecordCount - 1
For j = 0 To rs.Fields.Count - 1
MSFlexGrid1.TextMatrix(i, j) = rs.Fields(j).Value
If j = rs.Fields.Count - 1 Then
Load Check1(i + 1)
MSFlexGrid1.Row = i
MSFlexGrid1.Col = j + 1
Check1(i + 1).Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
Check1(i + 1).Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
'Check1(n).Width = MSFlexGrid1.CellWidth
'check1(n).Height=
Check1(i + 1).Caption = "check1(" & i & ")"
Check1(i + 1).Visible = True
End If
Next j
Next i
Thanks in Advance,
Regards,
|
|
|
|
|
Please, do NOT repost the same question again less than 24 hours after you already posted it. Have some patience and wait for one of the volunteers around here to get to your question. We all have out own real jobs to do outside of CodeProject.
You can find your answer here[^].
|
|
|
|
|
Question,
I have an inline SQL query that gets the last date from a SQL table. This query stores the retrieved value in a DataTable. How do I bind a Label Control to a DataTable?
I have specified the following but I only get the word "Table".
Label10.Text = Convert.ToString(dt1)
Please help!!
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Instead of wild guesses, try some research. dt1 is a datatable. So, you probably want to change your code to return a scalar, so you only get one value, but the easiest solution is dt1.Rows(0)(0).ToString()
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you!
A pleasure as always?
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Hi, All
I need to zip files programmatically,
Please, any references where I can find any information to zip and unzip
files.
(VB or VB .NET)
Thank you in advance,
Regards
Irfan Siddiqui
VB.Net Developper
|
|
|
|
|
|
|
can you please help me of what code i needed to use in order to send the backed-up file to its destination.thanks
|
|
|
|
|
please explain more...
what you means?
do you mean that you can copy backup file to another directory?
Human knowlege belongs to the world
|
|
|
|
|
Your question is not very clear at all. If you're looking to copy files, the System.Io namespace has what you're looking for, in the File, FileInfo, Directory, and DirectoryInfo classes. You'll find Copy methods on the File and FileInfo classes.
|
|
|
|
|
Yep, unless you mean File.Move("YourFilesCurrentPathAndName", "YourFilesNewLocationPathAndName")
My advice is free, and you may get what you paid for.
|
|
|
|
|
your answer will be a big help
thanks
|
|
|
|
|
Articles always have more info in them than forum replies.
http://www.codeproject.com/KB/cs/tsnewlib.aspx[^]
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I can't figure out how to add, edit and delete records in my database. whenever I try to add a new user to the database, this message comes out:
The 'Microsoft.Jet.OLEBD.4.0' provider is not registered on the local machine.
.ExecuteNonQuery() won't work..
I read that if your using datasets you don't need to use executeNonQuery.. But I don't know how to use datasets yet i have 'em..
this is the code i did for one adding records. PLease help me figure out what's wrong. I don't know if i have to change my settings on my pc or something's wrong with the code i did..
Imports System.Data.OleDb
Public Class frmUsers
Dim dbCon As New OleDbConnection("Provider = Microsoft.Jet.OLEBD.4.0; Data Source = dbCDNM.mdb")
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
Dim s As String
dbCon.Open()
If optAdmin.Checked Then
s = "INSERT INTO Users(Username, Password, Lastname, Firstname, MI, Usertype) VALUES('" & txtUsername.Text & "', '" & txtPassword.Text & "', '" & txtLastname.Text & "', '" & txtFirstname.Text & "', '" & txtMI.Text & "', ' Administrator ')"
Dim dbCommand As New OleDbCommand(s, dbCon)
dbCommand.ExecuteNonQuery()
MessageBox.Show("Record Saved")
ElseIf optLib.Checked Then
s = "INSERT INTO Users(Username, Password, Lastname, Firstname, MI, Usertype) VALUES('" & txtUsername.Text & "', '" & txtPassword.Text & "', '" & txtLastname.Text & "', '" & txtFirstname.Text & "', '" & txtMI.Text & "', ' Librarian ')"
Dim dbCommand As New OleDbCommand(s, dbCon)
dbCommand.ExecuteNonQuery()
MessageBox.Show("Record Saved")
Else
MessageBox.Show("You have to select a user type.")
End If
dbCon.Close()
End Sub
End Class
|
|
|
|
|
Best guess, the Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine. Other possibilities that spring to mind is that the mdb is not in the same folder as your exe, or it needs a username/password, and .NET is giving you a useless error message.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
can you please give me a sample codes regarding backup before logging off or shutting down the computer
|
|
|
|
|
Backup of what ? Your database ? Your source code ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sir,
I'm sorry sir for being not specific to my question. what I mean is files in my computer such as files save in drive d will need to be backup before logging off or shutting the computer
|
|
|
|
|
The only place you can put the launch of a Logoff or Shutdown script is in Group Policy. Click on Start/Run, then type GPEDIT.MSC and hit Enter.
Expand the Computer Configuration item on the left, then Windows Settings. This Scripts item is where the system's Startup and Shutdown scripts run from.
Expanding the User Configuration items, then Windows Settings, is where the User's Logon and Logoff scripts are run from.
You have to launch your code to do the backup from one of these places, depending on your requirements. But, a warning. The scripts only have a limited time to run. By default, it's 10 minutes. If your app doesn't finish it's work in that time, it'll be terminated and an error event logged.
|
|
|
|
|
hi
can anyone help me in generating auto emails after checking the credentials of the user.i am using .net2.0/vb.net/oracle
thank you
|
|
|
|
|
You can definitely use google to search this.
|
|
|
|