|
Hi,
Thanks for the reply. I am a complete novice to programming so please bear with me.
I use a bound datagrid to view my database data so there is no VB data behind code.
here is the query the datagrid uses:
SELECT [AdNo], [Date], [Fullname], [Sex], [Tutorgroup], [Details], [Time], [Consultant] FROM [Viewallconsultations] ORDER BY [Date]
How do I use the ToString function?
On SQL server, why isn't there just a date datatype? if I change this datatype to text then my date shows up ok in VB view but this will cause issues if I wanted to sort by date, etc
any more help please?
jono
|
|
|
|
|
I don't do any Windows Forms development so I can't say know exactly how to solve your problem. However this article[^] suggests that you need to define a Column Style for your date column. This might be something you can do through the control designer, or you can implement it in code as the article describes.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
OK, thanks for your help. I will look into the link.
jono
|
|
|
|
|
Try using the DataGridView's CellFormatting Event to set the DefaultCellStyle properties for the Column..
Me.DGV.Columns("ColName").DefaultCellStyle.Format = "dd/MM/yyyy"
...or something like that
The Fanatical All Black Supporter - Kea Kaha
|
|
|
|
|
I devoloped small program in VB.net with sql server and i made setup program. The problem is that i can change the connection after the installation in another user. Also i can not see the module for changing the string
please help me
|
|
|
|
|
Didn't understand your question fully do you want to change your connection string or not ???
AliAmjad(MCP)
|
|
|
|
|
yes i want to change the connection string in module after the deployment
please help me
|
|
|
|
|
Hi,
I am using VB6 and in one of my project I want to use winsock control with
SSL . I didn't find anything how to do it ? Is it possible to use ssl somthing like this :
"Enablessl = true" ??
Any ideas will be helpful to me . :->
Thanks,
Dan
|
|
|
|
|
Try OpenSSL I didn't use it but this may solve your problem. Hope it helps !
AliAmjad(MCP)
|
|
|
|
|
Hi,
Thanks, That's a good idea. But I was looking for somthing that I can use the ssl stream class which is available in .NET 2.0 . Any suggestions?
|
|
|
|
|
A two dimensional array contains two columns, one column with numbers 0 to 45 and another column with a sum number . i want to sort this array in descending order with the corresponding index.
the code is below
i am not getting what to do when they are same
the array is like
0 1 2 3 4
5 7 5 11 7
Dim row As Integer
Dim col As Integer
Dim temp(1) As String
Dim rec As Integer
For row = 0 To 46 - 2
For col = row + 1 To 46 - 1
If fileArray(row, 1) > fileArray(col, 1) Then
For rec = 0 To 1
temp(rec) = fileArray(row, rec)
Next
For rec = 0 To 1
fileArray(row, rec) = fileArray(col, rec)
Next
For rec = 0 To 1
fileArray(col, rec) = temp(rec)
Next
ElseIf fileArray(row, 1) = fileArray(col, 1) Then
what to write here ?
End If
Next
Next
|
|
|
|
|
Have you tried single stepping through each line to see what isn't working?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
What sorting algorithm is it that you are trying to use?
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Guffa wrote: Experience is the sum of all the mistakes you have done.
Hmmm, sounds like I've got alot of experience :->
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi everybody
i need to know that can i write a datagridColulmnStyle having a textbox for input and also atleast one button on the right of it ??
-----------------
|Textbox |Btn |
-----------------
Just like this as if it is one column of grid. I think i have explained my need clearly. If not please let me know. and if my query have any solution please reply
Salman Sheikh
|
|
|
|
|
im trying to make a program that makes u enter a password inorder to use a program the only problem is that u can see the pass word that istyped i would like to hide it so u just see *** insted of text here is my code
..........................................
Public Class Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Password As String
Dim InputPassword As String
Dim Attempt As Integer
Password = "test"
Attempt = 0
Do
InputPassword = InputBox("Enter password. This is attempt number " & Attempt & ".")
Attempt = Attempt + 1
Loop Until (Attempt = 3) Or (InputPassword = Password)
If InputPassword = Password Then
MsgBox("This password is valid!")
Dim F1 As New Form1()
F1.Show()
Else
MsgBox("This password is invalid!")
End If
End Sub
End Class
|
|
|
|
|
Just set the PasswordChar property of your TextBox to *.
AliAmjad(MCP)
|
|
|
|
|
"Just set the PasswordChar property of your TextBox to *. " i would do that but i carnt as i only mad a form that says click here to log in with a button then i put all the code on that so i carnt load up the for for when coding to do that im not realy bother how the code is as long as it works in some way cus this is for college and they dont care what code we use as long as it works
|
|
|
|
|
Why are you choosing a difficult way when you can easily do this with the functionality provided by the .NET Framework otherwise you have to adopt a difficult way by using APIs to get the current key pressed store it into a StringBuidler object assign a * to the inputbox for key pressed and repeat the process to get the work done and I think you should have looked at Rule No. 9 before even creating this thread.
AliAmjad(MCP)
|
|
|
|
|
arranmc182 wrote: Password = "test"
It is considered a bad idea to have plaintext passwords embedded right in your code. I hope you plan on using some crypto algorithm.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
You can simply use the MaskedTextBox from the toolbox. Then set its password char to "*" .
Thanks,
Dan
|
|
|
|
|
Hi all,
I am tring to use this property bag.
http://www.codeproject.com/cs/miscctrl/bending_property.asp
Does any one has the VB.net Version
Thanks
Dana
|
|
|
|
|
Hi all,
I am working in vb.net and i am using sql server as back end which is stored on the server.
Client can access the database using his user id and password,
but the problem is that with the same login account the user can login from more than one client machine.
:-OI want that if the client has logined using suppose user id A and password A
then he will be not able to login again using the same user id and password from another client machine.
So how can it possible? will i have to maintain session like Asp.net ?
if yes then how can i maintain session using vb.net
Any idea would be appriciated heartly
Thanks with anticipation
|
|
|
|
|
Add a field to your user account table that indicates whether the user is currently logged on.
If a user is logging in and the value in this field is false, set it to true.
If a user is logging in and the value in this field is true, disallow the login.
When the user logs out, set the value in this field back to false.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hello,
my name is sai kishore.Im working on a application which will ask the user for the backup,if he wish to take a backup,it must allow.im doing this application in vb.net 2005.
im unable to get the code for this.please help me,
my code is as follows
Private Sub cmdYes_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdYes.Click
'Dim ProcessId As Integer
Dim ProcessId As Object
Dim hProcess As Integer
Dim ExitCode As Integer
Dim LogFileName As String
Dim Process_handle As Integer
Dim path As String
'Dim vntretval As Variant
On Error GoTo localerror
'Check for User Name
'To check Export File Name.
If txtflname.Text = "" Then
MsgBox("Enter Export File Name.", MsgBoxStyle.Information)
Exit Sub
End If
'UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
'System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
System.Windows.Forms.Cursor.Current = Cursors.Default
path = dirExp.Path
'checks if any file name is entered
'calls the procedure Conn_user;it returns true if connection
'is established
Dim strPwd As String = ""
Dim Usname As String = ""
Dim Uspass As String = ""
Dim strcopy As String = ""
SystemParameters()
If OptData.Checked = True Then
Usname = strsuperuser
Uspass = strSupreUserPassword
ElseIf OptPhoto.Checked = True Then
Usname = strPhotouser
Uspass = strPhotoUserPwd
End If
'ProcessId = Shell(resbckdls.Fields("BACKUP_NAME").Value & " " & Usname & "/" & Uspass & "@" & strUserConnect & " File = '" & lblPath.Text & "' log='" & Mid(lblPath.Text, 1, InStr(1, lblPath.Text, ".") - 1) & ".log'", AppWinStyle.Hide)
ProcessId = Shell("Exp" & " " & Usname & "/" & Uspass & "@" & strUserConnect & " File = '" & lblPath.Text & "' log='" & Mid(lblPath.Text, 1, InStr(1, lblPath.Text, ".") - 1) & ".log'", AppWinStyle.Hide)
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, False, ProcessId)
Timer1.Enabled = True
Timer1.Interval = 100
Picture1.Visible = True
'anmExport.Open App.Path & "\FILECOPY.AVI"
'anmExport.Play
'anmExport.Visible = True
Do
Call GetExitCodeProcess(hProcess, ExitCode)
System.Windows.Forms.Application.DoEvents()
Loop While (ExitCode = STILL_ACTIVE)
Call CloseHandle(hProcess)
'UPGRADE_WARNING: Screen property Screen.MousePointer has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6BA9B8D2-2A32-4B6E-8D36-44949974A5B4"'
'System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default
System.Windows.Forms.Cursor.Current = Cursors.Default
'anmExport.Stop
'anmExport.Visible = False
Dim blnExportTerminatedsuccessfully As Boolean
Dim blnViewsExported As Boolean
Dim blnStoredProceduresExported As Boolean
Dim blnFileSize As Boolean
LogFileName = Mid(lblPath.Text, 1, InStr(1, lblPath.Text, ".") - 1) & ".log"
FileOpen(1, Mid(lblPath.Text, 1, InStr(1, lblPath.Text, ".") - 1) & ".log", OpenMode.Input)
Do While Not EOF(1)
Input(1, strline)
'UPGRADE_WARNING: Couldn't resolve default property of object strline. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
If strline = "Export terminated successfully without warnings." Then
blnExportTerminatedsuccessfully = True
'UPGRADE_WARNING: Couldn't resolve default property of object strline. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
ElseIf strline = ". exporting views" Then
blnViewsExported = True
'UPGRADE_WARNING: Couldn't resolve default property of object strline. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'
ElseIf strline = ". exporting stored procedures" Then
blnStoredProceduresExported = True
End If
Loop
FileClose(1)
k.v.s.s.kishore kumar
|
|
|
|