|
you can use WMI for that !!!!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Try out
http://www.microsoft.com/downloads/thankyou.aspx?familyId=2cc30a64-ea15-4661-8da4-55bbc145c30e&displayLang=en
|
|
|
|
|
I want to know the possible way to append a text file placed on webserver.
I am using vb.net and server is unix based.Will that create a problem?If it is a problem then we need to switch to windows server. Please help me its urgent
Regards
Shailendra
|
|
|
|
|
can you be a bit more specific in what you want?
as I understand it either you want to place a file on a webserver
or you want to download a file from a webserver and use it
in both cases it is possible if that webserver has an ftp server thru wich you can access the file
but without knowing exactly what you want I can't give you any specific code.
On a side note: don't put 'it's urgent' in you'r post (or subject) everybody's question here is urgent in some way, but this forum is manned by volonteers who will answer the questions the can when they can
anyway if you can provide me with a more detailed explanation of what needs to be done I can see about the code since I'm working on a programme that does pretty much everything one can do with ftp I'm sure I'll find some code to help you
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Hello every one.
I am creating a application in which i allow user to choose a color from pallet and the new drawing will be of that color...
I problem is that i want to use the back color of the pallet's label as pen color, but system.drawing.color dose not accepts RGB .... what to do???
|
|
|
|
|
nishkarsh_k wrote: i allow user to choose a color from pallet
Perhaps you mean a palette rather than a pallet?
nishkarsh_k wrote: system.drawing.color dose not accepts RGB
Of course it does. Use the Color.FromArgb method to create a color value from color component values.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Thanks for correcting
FormArgb solves my issue
Thanks
|
|
|
|
|
I am relatively new to database concepts, so please forgive any incorrect terminology.
I have created a custom query that gets a users data based on the user name they have entered, when i put this line in code:
Me.UsersTableAdapter1.FillByUserName(PasswordManagerDataSet1.Users, UNTextBox.Text)
I get an error to do with constraints, but i don't understand why.
Also i get a concurrency violation error when i try to update a record after filling a table using a custom query. Fill:
Me.PasswordTableAdapter.FillPasswords(Me.PasswordManagerDataSet1.Password, User)
I also get a constraints issue here.
I am trying to update using the automatic stuff VS2005 adds (i.e. the save button in the navigation bar it adds).
This is the save code:
Me.Validate()
Me.PasswordBindingSource.EndEdit()
Me.PasswordTableAdapter.Update(Me.PasswordManagerDataSet1.Password)
|
|
|
|
|
The ANZAC wrote: Me.UsersTableAdapter1.FillByUserName(PasswordManagerDataSet1.Users, UNTextBox.Text)
I get an error to do with constraints, but i don't understand why.
What are the constraints in the database?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, I am coding a login which involoves database verification. For extra security I added a new column to my database and added the extra code accordingly and I am getting this exception..
System.Data.OleDb.OleDbException was unhandled<br />
ErrorCode=-2147217900<br />
Message="Syntax error (missing operator) in query expression 'USERID='Brad' PASSID='test'' AND HardwareID='BRAD-8EYRYEUOH4'."<br />
Source="Microsoft JET Database Engine"
Here is the source for my project:
Imports System.Data
Imports System.Data.OleDb
Public Class Form1
Dim mypath = "C:\Temp\mydb.mdb"
Dim mypassword = ""
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mypath & ";Jet OLEDB:Database Password=abc123" & mypassword)
Dim cmd As OleDbCommand
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sql = "SELECT UserID ,PassID, HardwareID FROM MYTAB WHERE USERID='" & TextBox1.Text & "' PASSID='" & TextBox2.Text & "' AND HardwareID='" & TextBox3.Text
cmd = New OleDbCommand(sql, conn)
conn.Open()
Dim dr As OleDbDataReader = cmd.ExecuteReader
Try
If dr.Read = False Then
MessageBox.Show("Authentication failed...")
Else
MessageBox.Show("Login successfully...")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
conn.Close()
End Sub
I am completly stumped and dont understand what I have done wrong? Teh code was working fine until I added this extra bit in: HardwareID='" & TextBox3.Text
Many Thanks
-- modified at 20:44 Thursday 18th October, 2007
|
|
|
|
|
your missing the AND
WHERE USERID='" & TextBox1.Text & "' AND PASSID='"
|
|
|
|
|
Hi, I added the extra AND and here is the error what I am getting now!
Syntax error in string in query expression 'USERID='Brad' AND PASSID='test' AND HARDWAREID='BRAD-8EYRYEUOH4'.
The exception is on this line of code in my source:
Dim dr As OleDbDataReader = cmd.ExecuteReader
Thanks
|
|
|
|
|
Dim sql = "SELECT UserID ,PassID, HardwareID FROM MYTAB WHERE USERID='" & TextBox1.Text & "' PASSID='" & TextBox2.Text & "' AND HardwareID='" & TextBox3.Text
like said above you are missing the AND but also a "'" at the end of you sql string
so the above string becomes:
Dim sql = "SELECT UserID ,PassID, HardwareID FROM MYTAB WHERE USERID='" & TextBox1.Text & "' AND PASSID='" & TextBox2.Text & "' AND HardwareID='" & TextBox3.Text & "'"
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Thank you so much!!! I cant believe it was something that simple!!!
Cheers again!
|
|
|
|
|
no problem
I learned the hard way to check my sql string char by char (searched for the same thing a long long time a while back so...)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
I have converted a vb6 application in vb.net 2005 express.
My application has lots of procedures and functions in modules.
As same procedures are used in various exe files i want o create a common procedure base
(presently same procedures are used in various exe files as modules)
Can I create a .class file or dll file and call the same in main project files.
This will reduce lot of common code
please suggest sample code as I have no formal education in vb.net,
No one gets before time and more then destiny
|
|
|
|
|
Yes , You can
Just create a class in with the same namespace and that class will contain all of your recquired function,
and from the main fuction just create the object and access your required function !!!!!
Good luck
Happy Programming
-----
Abhijit
|
|
|
|
|
I verify that with these following codes I should see the MS-DOS windows
<br />
Public Class Form1<br />
Sub Main()<br />
System.Console.WriteLine("About VB Example")<br />
System.Console.WriteLine()<br />
<br />
' Prompt user for identifier<br />
Dim ReplyString As String<br />
<br />
System.Console.Write("Type A or B: ")<br />
ReplyString = System.Console.ReadLine()<br />
System.Console.Write("You typed: " & ReplyString)<br />
End Sub<br />
End Class<br />
But after running debug without any error ... I saw nothing. Even if I use a button to activate similar codes ... the result is nothing!
By the way I do have .NET Framework SDK
Anyone can help?
|
|
|
|
|
It appears that you have created a windows form project as indicated by the Class called Form1. Try creating a Console app instead. This worked for me.
Module Module1
Sub Main()
System.Console.WriteLine("About VB Example")
System.Console.WriteLine()
' Prompt user for identifier
Dim ReplyString As String
System.Console.Write("Type A or B: ")
ReplyString = System.Console.ReadLine()
System.Console.Write("You typed: " & ReplyString)
End Sub
End Module
|
|
|
|
|
You are absolutely right!
Thank a lots
|
|
|
|
|
hi all,
i have a datagridview in my program which contain Combobox type column. My problem is that combo box column require two click to open drop down list.
anybody have idea that how can i open dropdown list on single click ?( as we do in normal combo box control)
thanks in advance
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
i am populating the datagridview from db. i am making changes to datagridview and also i am adding new row.
|
|
|
|
|
Please provide more information.
|
|
|
|
|
i am going to populate the datagridview. i want to make changes to datagridview and i want that changes to be available in database . i will insert new row in the datagridview , i want to add newly added row to database. i am using sqlcommand option . but i want to use sqlcommandbuilder but i am uanble to update using sqlcommandbuilder.
Siva.
|
|
|
|
|
I would say use the RowAdded Event to trigger a function that finds which row was just added, parse that information, build an appropriate update command, then use that to update your database
|
|
|
|