|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdataoledboledbdataadapterclassfilltopic1.asp[^]
OleDbDataAdapter1.Fill(DsAdminLogin, "ADMIN1")
Your second parameter is a recordset, you're passing a string. Why ?
loginADMINID = txtUser.Text
loginADMINNAME = DsAdminLogin.Tables(0).Rows(0).Item("ADMINNAME")
loginADMINSTAFFNO = DsAdminLogin.Tables(0).Rows(0).Item("ADMINSTAFFNO")
loginPwd = txtPwd.Text
What's the use of all this ? You don't use these values anywhere, they will just be lost.
Me.Hide()
temp.Show()
If you're going to hide your main form, you'd do better to define your other form and your main form UI as user controls, and switch between them on the one form. As it stands, you have no mechanism in place for the form you're showing to close and your main form to reappear.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have attempted to use some of the new security classes in .NET 2.0. Question. How can I check the writes of the currently logged in user for a given resource suce as a file/directory. I want to know before taking an action if a user can write to a directory, can the user create a sub directory in a given directory on the network.
Here is what I have tried:
PUBLIC FUNCTION ReturnCheckMyRightsOnDirectory(XRightsToCheck AS DirectoryPermissions , XPath AS STRING) AS BOOLEAN
IF MY.Computer.FileSystem.DirectoryExists(XPath) = FALSE THEN
RETURN FALSE
END IF
TRY
DIM DirectoryName AS STRING = XPath
Dim dInfo AS NEW DirectoryInfo(DirectoryName)
Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl()
DIM DirectoryRightToCheck AS FileSystemRights
SELECT CASE XRightsToCheck
CASE DirectoryPermissions.Create
DirectoryRightToCheck = FileSystemRights.CreateDirectories
CASE DirectoryPermissions.Read
DirectoryRightToCheck = FileSystemRights.Read
CASE DirectoryPermissions.Update
DirectoryRightToCheck = FileSystemRights.Modify
CASE DirectoryPermissions.Delete
DirectoryRightToCheck = FileSystemRights.Delete
CASE DirectoryPermissions.Write
DirectoryRightToCheck = FileSystemRights.Write
CASE DirectoryPermissions.Execute
DirectoryRightToCheck = FileSystemRights.ExecuteFile
CASE DirectoryPermissions.Admin
DirectoryRightToCheck = FileSystemRights.FullControl
END SELECT
dSecurity.AddAccessRule(New FileSystemAccessRule(SystemUserName, DirectoryRightToCheck, AccessControlType.Allow))
dInfo.SetAccessControl(dSecurity)
RETURN TRUE
CATCH ex As Exception
RETURN FALSE
END TRY
END FUNCTION
|
|
|
|
|
Hallo,
Can anyone help me with a guideline on how to add a record (line) in an Excel heet? All i could find in the help files is how to import data from excel into a dataset object, but nothing on how to do the opposite.
From the help files i gather that it's as if working with a database table. The question is should I add parameters (and how), and what is the syntax for inserting the data?
Thank you in advance.
|
|
|
|
|
how ComboBoxCell in DatagridView Can be Autocomplete and use Item dictionary like other comboBoxes
|
|
|
|
|
How can I create a sudoku solver
Passion
|
|
|
|
|
You could have search CodeProject for Sudoku[^] and would have found some articles already implementing what you want.
|
|
|
|
|
If you really want to see what goes into creating one, check this[^] out.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi!
Can someone help me how to instance an axtivex object from a remote activex server? Createobject fuction will result in an error saying that the class is not registerd.
I created an activex server which is running in a separate computer. all my clients should take instances from that server. but i cannot do that with CreateObject in my client side programs. I am using VB6...
How can i do that????
Thanks
Leelanga
-- modified at 9:52 Monday 1st May, 2006
|
|
|
|
|
Actually, you DO use CreateObject. The problem is that your client machines don't know where the object is that is to be created. You can't just tell the machine Create this on this machine. You still need to register the COM object on the client machine. It's in that registration that the details of where that object is are stored.
Wow. I really need to dig up the old source. The last time I did something like this in VB6 was about 6 years ago. I wrote a keylogger that popped up a window on my machine the instant the remote server was instantiated on the client machine. Now where did I put that stuff...
You can start with this[^] little KB article to give you the basic idea.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave
Thanks a lot for that link. It was grate. Hay can you tell me another thing…is there any way that I can track all the instances of a particular activex server. What I want is to send a signal to all my clients at that moment. How could I do that in VB6?
Thanks a lot once again
Leelanga
|
|
|
|
|
Your server has to be written to be a Singleton (Single Instance) and has to be written to keep track of all the clients that connect to it. There is nothing that will do this for you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello I would wish to print on a sheet with the A4 format forty calculations which would be generated by the computer. (I had to create a program in vb6 who did that thanks to an additional component called nifprint here With vb 2005 express , I do not know, by what to start to carry out such a print. I know how to create calculations, but how to store them for then printing them?
what do need I : which control do i have to use for, then, using the new print controls (previewing and C°) offer in vb 2005 ?
Thanks for giving me a guide line.
quisnam igitur sanus ?
|
|
|
|
|
By VB.net programing, how can I explore a remote computer files and folders , and create or delete from it?!
Please, help me!
If anyone access me to a ready open code project, or any hits to do.
Thanks.
Joseph
|
|
|
|
|
hellow to all ..
i am looking to a way to print more than one report in one click , , that mean when i click the button i can print 4reports at once or show the 4 reports in a crystalreportviewer , thxx for anyhelp ,
|
|
|
|
|
Hi all
How can i read word (.Doc) file line by line from VB6
thanks
|
|
|
|
|
hi!
first add word referens to ur form
then create a new object from it.
then oenn it(give adress)
annd with read method ur work has finished!
good luck!
|
|
|
|
|
|
how to create code for sending argument to vb.net from vb6.
and how can vb.net receive the argument.
example:
send location path of folder from vb6 and use the path location in vb.net
thank you for kindness..
Ihsan
|
|
|
|
|
|
hello,
can u help me plz
i want to inherits some properties of treeview control to the listview control , 'coz i need this for my application.
i wil be gratefull
plz
give me solution
Regards
Irfan Siddiqui
programmer
|
|
|
|
|
What exatcly are you trying to achieve? What you request is not possible (would require multiple inheritance).
|
|
|
|
|
hello
thanks for response
sir i have a treelistview class that has all the properties of a control
& i wanto add a property called focused node and i used this property but i won't work .
Regards
Irfan Siddiqui
programmer
-- modified at 6:32 Monday 1st May, 2006
|
|
|
|
|
Hi,
sorry but you don't provide enough infos so that I can help you.
What extactly is treelistview? Its not part of the framework. Is it a control you built yourself or one downloaded from somewhere?
If it is not too much you can post the relevant code snippets and point out what exactly is not working.
|
|
|
|
|
hello
thanks for ur interest
yes i have download it , it is a hybrid of treeview & listview control. but it has no property like other controls have as Focusednode or focuseditem hence i want to add this property in my Treelistview.
i am showing u some code sample of its property called
selected node property,
but it's not working
Private WithEvents mSelectedNodes As New NodeCollection<br />
<Browsable(False)> _<br />
ReadOnly Property SelectedNodes() As NodeCollection<br />
Get<br />
Return mSelectedNodes<br />
End Get<br />
End Property
Regards
Irfan Siddiqui
programmer
|
|
|
|
|
Hi
I want to change the GUI of my program to something more intresting (than the usual shape of forms and controls).
I don't know where to start... I'd be glad if someone could show me a tutorial and/or controls to do so...
Thanks
|
|
|
|