|
okay it works
can you tell me how to use install assembly
|
|
|
|
|
Do you want to use the installed assembly????
Cheers,
Suresh
|
|
|
|
|
iam new in c#.net can u tell me why we install install assembly globaly and
what are there uses and how can one make use of it
|
|
|
|
|
|
I made a DataGridView on my form and bound it to data from my database. Everything works fine.
What I want is to allow user to add rows to my database using this DataGridView. I set the 'AllowUserToAddRows' property to true. When running the application, I can add new rows to my DataGridView, but no changes are made to database.
How to make it?
Thank you very much in advance
|
|
|
|
|
You must update database from datagriview. Add this code into your app
using System.Data.Oledb;
DataTable dt = (DataTable)datagriview1.datasource;
OledbDataAdapter adap = new OledbDataAdapter ("Select * from <tablename> where <primaykey> = 0 (or "")", con); //con = new OledbConnection(<connectionstring)
oledbcommandbuilder buider="new" oledbcommandbuilder(adap);
adap.fillschema(dt,schematype.sourced);
adap.fill(dt);
bool="" result="(adap.Update(dt)==1)?true:false" ;
="" true="" :="" is="" successfull.="" otherwise="" not.
=""
<div="" class="ForumSig">It seem to be a solution or an answer.
|
|
|
|
|
Thanks!
I just wonder, if this could be achieved automatically? Just like getting info from database into DataGridView is..
|
|
|
|
|
Yoyosch wrote: I just wonder, if this could be achieved automatically? Just like getting info from database into DataGridView is..
Why did you think so easily ?
It seem to be a solution or an answer.
|
|
|
|
|
update the database with the values from the datagrid, as soon as a new row is added to the datagrid.
Keshav Kamat
India
|
|
|
|
|
Hi All,
I'm trying to get the exit time of a process which has been initiated using the process class. An event has been written which will be triggered when the process is being closed. But the problem here is, the event is not getting triggered. Here is the code:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "notepad.exe";
startInfo.Arguments = @"E:\shared\perdata.txt";
startInfo.WorkingDirectory = @"C:\Temp";
startInfo.WindowStyle = ProcessWindowStyle.Maximized;
oProcess.EnableRaisingEvents = true;
oProcess.Exited += new EventHandler(ProcessExited);
oProcess = Process.Start(startInfo);
Event to be called:
public void ProcessExited(object sender,System.EventArgs e)
{
MessageBox.Show(oProcess.ExitTime.ToString());
}
Any help would do. Thanks in advance
Parimala
|
|
|
|
|
|
The event is getting triggered. I've found what is wrong with this.
Instead of using startInfo.filename & startInfo.arguments, I should use oProcess.StartInfo.filename.
Anyway, thanks for the suggestion.
Parimala
|
|
|
|
|
|
hi,
does anyone knows how to call MS Access, import data from external source form (window) programmatically?
please help.
asanka.
Asanka
|
|
|
|
|
My problem is that i do not really know how to create a user on the aspnet_user tables because it is link together with multiple tables and the userId is a unique identifier that is encrypted in 32 hexidecimal format. i would appreciate if there is anyone able to help me?
|
|
|
|
|
Hi,
Are you trying to implement a log on web service ? I think, you can use the SqlMembershipProvider for this, but I am not sure about it.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
i think should be cause my work i am doing is that i am a administrator and i am supposed to create a new user in the aspnet_users database. but i do not know how to write the source codes for it on my web service.May I know how to do it?
|
|
|
|
|
You can just execute the aspnet_Membership_CreateUser stored procedure from the database with appropriate parameters. Even if you want to add some user to a particular role then you can use aspnet_UsersInRoles table.
hope this helps. Just go through the procedure first to see whether it solves your problem and you are able to understand what it is doing. If you are going to create user on live site, TAKE BACKUP FIRST !!!!!!
For you reference here is a link from MSDN :-
http://msdn2.microsoft.com/en-us/library/aa478949.aspx[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I have managed to do create user using membership and Role provider for my web service now i need to add a new table to my aspnet_users table using membership, but i am encountering problems in that i am don't know how to use the sqlparameter having uniqueidentifier to store the info in my new table linking to aspnet_users table, may i know how?
|
|
|
|
|
|
What will you do with this service ? I mean, by logging all the keyboard strokes, for what you will use them.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
I know how to write that in C-Language
using TSR(Terminate But stay Resident).
Achieving this is very easy in c-Language.
Juts 10 lines of Code that uses
getvect()
setvect()
keep()
functions.
If U have enough time
try to learn these functions,
how to create C dll(Using MS Compiler)
and how to import them in .NET using
DllImport method.
Regards,
Arun Kumar.A
|
|
|
|
|
Hi Arun,
Thanks for your reply.
Can you refer me any online documentation to learn all of these!
Best Regards,
Emran
-- modified at 9:02 Saturday 21st April, 2007
|
|
|
|
|
My code is here
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
DataObject obj = dataGridView1.GetClipboardContent();
str = obj.GetText(TextDataFormat.CommaSeparatedValue).Substring(1).Split(',');
}
private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
DataGridViewRow dgvRow = dataGridView1.Rows[0];
for (int i = 0; i < str.GetLength(0); i++)
dgvRow.Cells[i].Value = str[i];
dataGridView1.Rows.Add(dgvRow);
}
catch (Exception ex)
{
}
}
But it throws an exception "Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound"
I am very confused. Kindly help me. Thanks
It seem to be a solution or an answer.
|
|
|
|
|
try setting
editmode to EditProgrammatically in datagridview properties.
|
|
|
|