|
If you right-click on a file in Windows Explorer, a menu pops out with functions like Copy To, Scan With etc.. How can i add my own option like Copy With <programname> and then, when the user clicks it, it opens my program with the name of the file in a variable. How can I accomplish this?
--Zaegra--
|
|
|
|
|
Search google or codeproject for Shell Extensions
Also you may use registry keys if you only want your program to handle some known types of files.
|
|
|
|
|
Hi everyone,
I was wondering how you all went about connecting to your databases from a security point of view. Some people say to use the SA password and embed security in your app with internal usernames/passwords, while others use Windows Security.
I think the SA password idea sounds simplier, and has the advantage of being able to limit what data the user gets to (eg: which clients information they can see) HOWEVER it doesn't stop someone using the password with MS Access to bypass your app and get the data.
So I was thinking the integrated security is best, and like any security, the use of groups would be best. My issue then becomes how to use those groups in SQL / VB.NET to enforce security, especially how would I enforce record level security (eg: which clients information they can see)
Thoughts everyone ??
|
|
|
|
|
Mark Cabbage wrote: Some people say to use the SA password
Did you beat these people about the face and neck for doing something so ridiculously stupid?? Really, why would you give an application GOD rights to the ENTIRE SQL Server??
Mark Cabbage wrote: I think the SA password idea sounds simplier,
And would get you fired, on the spot, in any real job. Who cares what the advantages are at that point...
Mark Cabbage wrote: the advantage of being able to limit what data the user gets to
You would normally create several different user accounts in the database that the application uses appropriately. These user accounts would then get various permissions assigned to them in SQL Security, depending on the role of that user. Say there was a user created that was used only look at the data in a couple of tables. This user would get permissions to execute SELECT queries on just those tables. Anything it tried to do would be denied by SQL Server.
Seriously, this is such a big topic, no one, or ten, forums posts is going to cover what your options are, and there is no one option that is best for every situation. Pick up a book on SQL Server and you'll find a couple of chapters on the subject. Pickup a book on SQL Server Security, and you'll find the entire book written on this very subject.
|
|
|
|
|
Hi Dave,
Thanks for your reply. Your response seemed to suggest on using limited SQL accounts if I read it correctly. Is there any reason you didn't mention Active Directory accounts and groups ??
I appreciate this topic is massive. I'd appreciate if you knew of any good resources (online or book based) that covered this topic well from all view points.
I need a balance between security and functionality. I really want to limit the customers a contractor can see to just them, and if I have numerous contractors it's too hard to use numerous hard coded accounts.
|
|
|
|
|
Mark Cabbage wrote: Is there any reason you didn't mention Active Directory accounts and groups
Possible, but a PITA to administer. Imagine a company with 10,000 users...
Mark Cabbage wrote: I really want to limit the customers a contractor can see to just them,
There's a couple of ways of doing this. Either your app checks a directory group for membership in some kind of "Contrator" group, or if SQL Windows Integrated security is turned on, SQL Server security can be setup to use that group instead of an SQL User Account.
Any of the SQL Server Security books would cover this. Just go to Amazon and search for "SQL Server Security". Believe it or not, the SQL Server Programming books don't get into this stuff very deep at all.
|
|
|
|
|
Dave Kreskowiak wrote: you didn't mention Active Directory accounts and groups
Possible, but a PITA to administer. Imagine a company with 10,000 users...
I sure wouldn't want to do that. 10,000+ users, yikes
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have! 30,000 desktops and 300,000+ users.
Imagine making just one little mistake where noone can login!
|
|
|
|
|
Dave Kreskowiak wrote: Imagine making just one little mistake where noone can login!
Yep. That'd be a big oops for the day :->
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I know, from first hand experience. Whoops! :->
|
|
|
|
|
Dave Kreskowiak wrote: Mark Cabbage wrote:
I think the SA password idea sounds simplier,
And would get you fired, on the spot, in any real job.
I already mentioned this is a cross post of his. I kind of got snapped at about Active Directory and he didn't even mention using it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Dear friends,
I have a problem that i want to depackage a computer package.
Situation is as under.
i have following tables
1. Casing (CasingID, Model, Status, Notes)
2. Motherboard (MotherboardID, Model, Status, Notes)
3. Keyboard (KeyboardID, Model, Status, Notes)
4. Mouse (MouseID, Model, Status, Notes)
5. Status (StatusID, Status)
(values) 1, Packaged
2, Available
3, Damaged
etc.etc.etc....
6. Package (CasingID, MotherboardID, KeyboardID, MouseID)
now i have a form (PACKAGE FORM) on which there is a listview with following columns
ITEMID ITEM-TYPE SPECS
1 Keyborad multimedia...
2 Motherboard 16-bit architecture...
3 Mouse wirless....
4 Keyboard non multimedia...
5 Casing ATX power supply...
OK, now try to understand care fully that before saving a package, A function (i have written to change the status which checks every time in the packge) moves table to table and changes the status of items to "PACKAGED". this function is working properly.
Problem is that when i reload the package to remove some items from the package
then how i can keep in mind that what items are removed from the package because i have to again change their status to "AVAILABLE"
i have two solutions already with me
1. when ever i remove some item from listview, then immediately change the status in the reference table
2. Add an array to the project which save my removed items and in the end a fuction should go to all the reference tables to change the status
have you any other shortest solution for that.... please
|
|
|
|
|
Guys, I badly need your help on this. My thesis drives me nuts with this program. I have encountered a few here and there errors with our proposed system. I'll be enumerating them here. I really need help here, since the pre-defense will be on the 28th of the month...
BTW, just for info, I am a ComSci student
My program is on SQL coding and uses VB .NET 2003
As for database, I use Microsoft Access
Errors
* When I try to add user information, I generate this error
Data type mismatch in criteria expression
Simply put, it's when I try to add values to the database for student
information like student number, last name, course, etc.
* I see this error when I code this
Dim f3dg1 as List
Well, the f3dg1 is user defined, i just referred to it as mnemonics to form3
which has a datagrid. What the error in here is the keyword List, which VB "doesn't seem to recognize"
* Ok, here's the last. Here is the program segment for my datagrid.
I can't display column headers in my datagrid (gave me countless sleepless nights... duh) which is why my query (well, actually just a masterlist) don't work.
Try
Dim f As New List
Dim ja As OleDbDataAdapter
Dim ds As DataSet
Dim dv As DataView
Dim dg As New DataGrid
Dim str As String
Dim t As New DataGridTableStyle
Dim d As DataRow
Dim f3dgc1 As DataGridTextBoxColumn
Dim f3dgc2 As DataGridTextBoxColumn
Dim f3dgc3 As DataGridTextBoxColumn
f.f3p1.Controls.Clear()
f.f3p1.Controls.Add(dg)
openconn()
str = "Select * from books"
f.show()
ja = New OleDbDataAdapter(str, dbconn)
f.f3p1.controls.add(dg)
dg.Height = 584
dg.Width = 320
ds = New DataSet
ds.Clear()
ja.Fill(ds, "books")
dg.TableStyles.Add(t)
t.MappingName = "books"
f3dgc1.MappingName = "bookid"
f3dgc1.HeaderText = "Book ID"
f3dgc1.Width = "100"
f3dgc2.MappingName = "bname"
f3dgc2.HeaderText = "Book Name"
f3dgc2.Width = "300"
f3dgc3.MappingName = "aname"
f3dgc3.HeaderText = "Author Name"
f3dgc3.Width = "200"
If Me.BindingContext(ds, "books").Count > 0 Then
With dg
.Dock = DockStyle.Fill
.DataSource = ds
.DataMember = "books"
.Refresh()
End With
Else
f.close()
dg.Visible = False
MsgBox("no record found", MsgBoxStyle.Exclamation)
End If
dg.Refresh()
dg.DataSource = ds
dg.DataMember = "books"
dg.ReadOnly = True
closeconn()
Catch ex As Exception
MsgBox(ex.Message)
End Try
I can send you the program as a whole if you want, if these confuses you.
Please, I don't want to see a grade of 5.0 on my thesis subject
Hoping for quick responses.
Loose Lips Sink Ships
|
|
|
|
|
Ask your advisor at school, that is what they are supposed to be there for.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
well of course, i've been consulting them, i just wanted to see if I can acquire any help I can get here...
|
|
|
|
|
Holy Orders wrote: Data type mismatch in criteria expression
Simply put, it's when I try to add values to the database for student
information like student number, last name, course, etc.
What data is the database expecting and what are you trying to put in there. You may want to show the database table structure along with your code you provided
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You've got a ton of problems with this code. I'd rewrite it to simplify it, but you have to do it yourself. If anyone else rewrote the code and you turned it in, the coding style would suddenly change and you'd get put under a microscope for cheating.
Holy Orders wrote: * When I try to add user information, I generate this error
Data type mismatch in criteria expression
Simply put, it's when I try to add values to the database for student
information like student number, last name, course, etc.
We can't answer this question because you've supplied no information on the structure of the database or the code that is used to add this to the database. From the error, you tried to do something like put a number into a field expecting a string of characters.
Holy Orders wrote: * I see this error when I code this
Dim f3dg1 as List
Well, the f3dg1 is user defined, i just referred to it as mnemonics to form3
which has a datagrid. What the error in here is the keyword List, which VB "doesn't seem to recognize"
What is "List"?? From your code, "List" better be the name of a form you created in your project. It's also a very bad name to use because in .NET 2.0 (VS 2005), List is now a collection class.
Holy Orders wrote: * Ok, here's the last. Here is the program segment for my datagrid.
I can't display column headers in my datagrid (gave me countless sleepless nights... duh) which is why my query (well, actually just a masterlist) don't work.
You do NOT have to create three seperate variables for TextBoxColumns. You would actually be better off putting in the code to setup the DGV in a seperate method. And your current variable names suck, badly. A CompSci student writing a thesis paper should already know the meaning of 'self documenting code' and how it applies to variable names.
|
|
|
|
|
Dave Kreskowiak wrote: We can't answer this question because you've supplied no information on the structure of the database
Which is what I asked last night and no reply, so no help until then :->
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yeah, I thought the more people that bring that up, the greater the chance of it sinking in...
|
|
|
|
|
Dave Kreskowiak wrote: the more people that bring that up, the greater the chance of it sinking in..
Yep.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I want to use Crystal Report9.2 to create a test.rpt,and test.rpt contains a picture in the detail section, but the picture field is only stored the file path in the SQL server, I do not how to create this test.rpt, and after creating it how to call the test.rpt in vb6.0?
Many Thanks!
|
|
|
|
|
(1) - Record Audio
I want to make an audio recorder. It can record from microphone input, all sound from the computer, part of it (wave only, cd audio only, or line-in only). How can I do that.
(2) - Read Current Audio Volume
Is there some ways to read the volume of the audio mixer, since i want to make something using progress bar that detect current volume of my pc. Anyone can help me?
Thanks
- No Signature Available -
|
|
|
|
|
Hello,
You may use the following VB Script to record audio:
Dim rec
Set rec = CreateObject("AudioCtl.AudioRecord.1")
'Select sound device 0
rec.DeviceIndex = 0
'Set output file
rec.SetOutputFileName "1.mp3"
'Start record with given parameters, record mp3 audio
rec.StartRecord 2, 11025
'Record for 10 secs
WScript.Sleep 10000
'Stop Record
rec.StopRecord
Thanks,
James
James Smith
www.componentone.com
|
|
|
|
|
Hi,
I thought you might be interested in this[^] article, from the Coding4Fun blog
I are Troll
|
|
|
|
|
Guys how can i get my computer name using visual basic 6.. thnkz..
|
|
|
|
|