|
Scenario : client server application. vb6 client side application to Microsoft SQL server database.
all clients have registry keys to provide odbc connection to a database holding available environments.
Once a user has selected the environment they require the specific odbc string is supplied from this master to the specific db for the selected environment and the master plays no further part.
Problem : because every user selects from the same list all connections are listed under the same user in SQL making life very difficult to resolve locking issues that occure.
The use of windows integrated logins is not possible as i have no access to the application code and we need to prevent r/w access to the environment databases from say office applications.
Solution : I am therefore considering implementing a wrapper for the client application to generate individual sql logins and account in the master DB so that the connections can then be distinguished in SQL.
The wrapper will need to talk to a service that will have the relevant sql access to create / disable / enable the logins.
Question : with all this said can I please have relevant pointers / ideas / examples to first create this service that will need to talk to SQL via a dedicated admin account and also to clients on the network probably via IP using again probably XML.
I am not looking for spoon feeding as I enjoy learning in this hands on method just places to go / articles and examples that explain principles that I can then adapt.
Thanks for the assistance
Bryden
P.S I do realise that this will not be a walk in the park and that I could probably have posted this on a number of different forums but I plan on using c# unless advised differently.
|
|
|
|
|
Your core issue is managing the locking issues, probably identifying the culprit PC so you can go thump the user. I know when we use OLEDB the workstation id is in the connection and can be seen in Profiler, I don't know if ODBC supplies this info. We then have an internal register of PC/User so we can find the transgressor, what I really want is a remote reboot
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Yes ODBC does provide the workstation ID.
Life becomes more complex however when the client is a terminal / citrix server then all users also have the same client.
I have another way around this by interogating sys.sysprocesses and lokking up not only the hostname but also the hostprocess columns.
The hostprocess number equates directly to the process id that can be seen in task manager or terminal server manager to identify the user.
The main point of this is that I think my solution would make life easier for my customers and allow me to learn a lot more about c#.
I do know where your coming from though with the remote reboot although a sledge hammer is sometimes more appropriate!
|
|
|
|
|
Bryden.Murdoch wrote: allow me to learn a lot more about c#.
I seem to have got the goals mixed up , this one I can relate to.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
I was coming to this forum hoping to help people but then I read this and my brain just kindof BSODed trying to interpret the code as C#
It's not really a problem, but maybe you should try the ASP forum?
|
|
|
|
|
hey guys,
i have a dataset which is bound to a gridview , i would like to make the first row in the dataset as the last row in the dataset or in the gridview ( eventually i need it for the gridview) what is the most effective way to do such simple task?
Net
|
|
|
|
|
i want to use web space for some files. and i want to build a software that can be install on computer,and by that software i can search some files in that particular web sapce and also downlaod that files and also can upload some files......... is it possible with C#???????
|
|
|
|
|
Yes
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
That's called FTP. You wan't to make an FTP client.
|
|
|
|
|
pls tell me how i use?
i also wanna some database which database should i use? and how? pls guide me
Thanx.
|
|
|
|
|
Why would you want to use a database? Ftp would be comparable to traversing a tree structure using recursion, you wouldn't need a database..
|
|
|
|
|
My need is to make "video collection system" for my final year project. I already make it for LAN,but now i want to make it web base application so that any one can install application implemented in C# and download videos from web from anywhere and also can upload video. It is something like Metacafe.
Pls tell me how i can build this. Provide me some guide line.
Thank you for kind support
|
|
|
|
|
Hello,
I am working on a project in vs2008 (C#). The problem facing is when i open a mdi parent form in maximize style and then open any other form on that form i always open as maximize
Thank You!
|
|
|
|
|
The WindowState of the MdiParent makes no difference. If one ChildForm is Maximized then so are all ChildForms however.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi,
I'm using C#.net 3.0. I have use the frameGrabber class to grab the frames from the video file and to convert the frames into bitmap format.The code is giving error in the "foreach (FrameGrabber.Frame f in fg)line of the code" highlighting "in" giving error---"InvalidCastException was unhandled by user"(Unable to cast COM object of type'DirectShowLib.DES.MediaDet' to interface type 'DirectShowLib.DES.IMediaDet'.This operation failed because the QueryInterface call on the COM component for the interface with IID '{65BD0710-24D2-4FF7-9324-ED2E5D3ABAFA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).).I use this background worker so that I can stop the extraction of frame in middle of execution,but if i don't use this Background worker the code is running properly.
[code]
private void button43_Click(object sender, EventArgs e)
{
backgroundWorker1.RunWorkerAsync();
}
private void button44_Click(object sender, EventArgs e)
{
backgroundWorker1.CancelAsync();
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
string outPath = txtExtBitmap.Text;
System.IO.Directory.CreateDirectory(outPath);
if (fg != null)
{
foreach (FrameGrabber.Frame f in fg)
{
using (f)
{
picBoxFrame.Image = (Bitmap)f.Image.Clone();
f.Image.Save(System.IO.Path.Combine(outPath, "frame" + f.FrameIndex + ".bmp"), System.Drawing.Imaging.ImageFormat.Bmp);
}
if (fg == null)
{
return;
}
}
}
if (backgroundWorker1.CancellationPending)
{
e.Cancel = true;
return;
}
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Cancelled)
{
MessageBox.Show("Operation Cancelled");
}
else
{
MessageBox.Show("OperationCompleted");
}
}
[\code]
|
|
|
|
|
Not sure about the specific error, but the CancellationPending check should be inside the foreach loop otherwise it won't be reached until all the frames have been 'grabbed'and the method is about to return anyway, which makes it kind of pointless.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
|
Yeah, I've had a look and I'm not sure about that, but a least when you fix it you'll be able to cancel when you wish.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi!
There is a solution for leave RowState unchanged when the user edited
a cell, but its value is not changed?
I am using OnEnter edit mode and if I enter another row the database
everytime is updated with the previous row regardless it is changed or
not.
Thanks!
|
|
|
|
|
Hello,
I am having problems populating a second DataTable to use as a data source for a second datagridview on another form. The second DataTable is pulling data in from the main datagridview using a query but the second datagridview doesn't populate. Can someone point me in the right direction please? Here is the code I am running:
Form1:
string Query = ("SELECT DISTINCT product FROM [" + dataGridView1 + "]");
DataTable GetDocs = new DataTable(Query);
DataRow NewLine;
NewLine = GetDocs.NewRow();
GetDocs.Rows.Add(NewLine);
private DataSet Sds;
public DataSet GetDocs
{
get
{
return Sds;
}
set
{
Sds = value;
}
Form2:
InitializeComponent();
GetForm1 = new Form1();
object GD = GetForm1.GetDocs;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView2.RowHeadersVisible = false;
this.dataGridView3.RowHeadersVisible = false;
this.dataGridView4.RowHeadersVisible = false;
this.dataGridView1.DataSource = GD;
Tahnk you,
Brenton
|
|
|
|
|
Did you paste in the code, or type it?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Henry,
The code came from a couple of sites but I typed it in and modified to fit my needs.
|
|
|
|
|
OK. I meant, did you paste it into this site, or type it. But ignore that for now.
Without trying to follow what your code is trying to do, a couple of things spring out.
You have two members with the same name, in the same scope.
DataTable GetDocs = new DataTable(Query);
and
public DataSet GetDocs
Now the compiler should have given you a warning at the very least, unless you have warnings turned off.
Did you ignore the warnings? Because as things are the line from Form2 object GD = GetForm1.GetDocs; will return the second of these which doesn't seem to get initialised anywhere.
Turn on warning level 4, if it's not already on. Recompile and sort out any warnings.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Sorry, misunderstood you. Yes I did paste it into the message.
I checked to see if warnings where turned off and it doesn't seem to be. I clicked on properties in the solution explorer tab and it looks to be ok. Is there another place I can do this? Otherwise, when I run the app it gives no signs of errors or warnings.
I thought both the lines of code are needed. The first one is to declare a new DataTable. The second line is to pass the DataTable to the second form. Is this not correct? I did it this way because that is how you helped me with passing the delimiter to different forms in the last posting I have. Is there a difference when passing strings versus objects?
Thank you,
Brenton
|
|
|
|