|
Ofcourse At 1st I searched there but didnt get exact info. related to LIVE video then asked.THANX.
Shanzay
|
|
|
|
|
hai, I've got question about RTB Controller in C#
I need to "hide" some of text in RTB Controller. I'm thinking of using TreeView Controller so if the user wants to "unhide" they just expand the treeview.
is it possible to add another control like treeview controller in RichTextBox?
if not possible, is there another way to hide some text in RTB Controller?
regards
~erwin~
Mail me at erwin@holyknight.us
|
|
|
|
|
Hi All,
I’m new to C#, however I’m willing to learn it everyday. I'm trying to create a simple program that will run in console mode. Below is the objective and what I have done so far.
Objective:
To check if the remote host are online in the network resolved by using WINS lookup and sent ping request to get reply status, using ip address get from nblookup.exe. I manage to get first part run. Now I want to process the output of the "nblookup.exe" and get the ip address in a variable to use later in ping command.
Can anybody kindly guide me on how to do this? Really appreicate your help in advances. Thanks
regards,
dinidamia
My Sample Code:
-------------------------------------------------------
using System;
using System.Diagnostics;
namespace program
{
class program
{
// args[0] must be hostname.
static void Main(string[] args)
{
if (args.Length == 0)
{
//If user did not enter any Parameter inform him
Console.WriteLine("Usage : program <hostname> ");
return;
}
else
{
string sUserInput = args[0];
QueryWinsSrv(sUserInput);
}
}
#region
// QueryWinsSrv:
// Run nblookup.exe against remote host
// If the hostname resolved in WINS
// ping remote host using ipaddress found in WINS
static void QueryWinsSrv(string sRemoteHostname)
{
Process p_nblookup_cmd = new Process();
p_nblookup_cmd.StartInfo.FileName = "nblookup.exe";
p_nblookup_cmd.StartInfo.Arguments = "-s 10.88.8.3 " + sRemoteHostname;
p_nblookup_cmd.StartInfo.UseShellExecute = false;
p_nblookup_cmd.StartInfo.RedirectStandardOutput = true;
p_nblookup_cmd.Start();
string nblookup_cmd_output = p_nblookup_cmd.StandardOutput.ReadToEnd();
Console.WriteLine(nblookup_cmd_output);
p_nblookup_cmd.Close();
}
#endregion
}
}
-------------------------------------------------------------
Program Output:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\program.exe JOE_WXP1
Recursion is on
Querying WINS Server: 10.88.8.3
NetBIOS Name: JOE_WXP1
Suffix: 20
Name returned: JOE_WXP1
Record type: Unique
IP Address: 10.88.8.20
|
|
|
|
|
Look into the RegEx Class[^]
You can also Google for Regular Expression examples on how to find IP Addresses.
|
|
|
|
|
Hi All,
Iam having two tables
table1
1.Rno Primary key
2.name
3.empid foreign key of table2
table2
1. empid primary key
2.address
3.Rno foreign key of table1
Here Rno and empid are auto generated. Now i want to insert data into first table i need sql query for this.Please help me on this
i want to join this group
|
|
|
|
|
It should be something like:
INSERT INTO table1 (name,empid) VALUES ('string for name',int empid)
|
|
|
|
|
Hi,
Thanks for replying.But the problem is empid and rollno both are auto generated
If i want to insert into table1. i need empid.But empid is generated when ever we pass rollno to table2.Please help me on this.
i want to join this group
|
|
|
|
|
You have to select empid first like:
Select empid from table2 where name like '%ABC%'
by executing it
int id = convert.toInt32(cmd.ExecuteScalar())
then
inser into table1 (name, empid)value("XYZ",'+id+')
cmd.ExecuteNonQuery
that's way u get ur task.
it is more robust if u use Transaction here.
bye
|
|
|
|
|
Hi,
The main problem is if i want to access empid.i need a rollno.But in table1
if i want to insert rollno,i need empid.both rollno and empid are auto generated and primary key in table1 and table2.
i want to join this group
|
|
|
|
|
Right - first of all, this isn't the right forum for this. There's a SQL forum here on CP that would be better suited for this.
Secondly - please use a different post title. Everybody's query is urgent - nobody ever says, "take your time and get back to me when you can". There are guidelines that should be followed when posting to the forums; they can be found here[^].
Now - to insert into a table with an autoincrement, you miss the autoincrement out of the field list, so in the case of this you would do
INSERT INTO Table1(name, empid) VALUES (...,...) Now, you have a circular reference between the two tables. Is this what you really want?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
Thanks for giving suggestions.Iam new to this forum.I will post same message in sql forum.Yes iam having circular reference.
i want to join this group
|
|
|
|
|
It looks like your purpose is to have roles list ant employees list and you need some how to assign roles to employees.
If this is the case - I would have done this with three Tables.
TableEmps -- empId, empName (PK - empId)
TableRoles -- roleId, RoleName (PK - roleId)
TableRoleToEmp -- roleId, empId (FK1 roleId ref - TableRoles.roleId, FK2 empId ref - TableEmps.empId)
|
|
|
|
|
Hi All
Please help me.
I am developing an intranet application, it has page that shoul donly be access by certain people, to do this I used the Page.User.Identity.Name.
The problem is when Irun the application on my local computer Page.User.Identity.Name
returns my user name in the format domain/username.
However when I upload the page to the server Page.User.Identity.Name. returns
an empty String.
What is the possible cause of this and waht is the solution to it.
Please help!
Thank You in advance.
khuzym
|
|
|
|
|
Disable anonymous browsing on the site.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you so much Guffa, you solved my problem.
khuzym
|
|
|
|
|
Hi Dears!
I m displaying amount in datagridview while editing the amount, i have to check whether user enter negative value if so prompting it and setting focus back to the amount cell;
i try hard such as:
dataGrid.SelectedRows(0).Cells(0).Selected = True,
DataGridView dv;
dv.CurrentCell = new DataGridViewCell(row_index, col_index);
dataGridview.SelectedRows[e.Row].SelectedCells[2].Selected = true;
but all in vain so far; if any one have idea regarding this so please tell me.
Thanks in advance.
|
|
|
|
|
hi,
try using the keypress event of the datagridview.
as
private void DataGridView1_KeyPress(Object sender,KeyPressEventArgs e)
{
DataGridView1.SelectionMode = DataGridViewSelectionMode.CellSelect;
DataGridView1.CurrentCell = DataGridView1.Item(3,DataGridView1.CurrentCell.RowIndex);
}
hope this helps
Regards
Anuradha
|
|
|
|
|
How to bind the countries in html select control using javascript
Here ,I want to bind all the countries,states list in the html select controls separately depending on selection of perticular country for storing in database... using javascript or c#.
Thanks.
|
|
|
|
|
I think you want the ASP.NET forum. I'm sure there are controls that do this on this site and elsewhere. You need a list of countries and a list of states for each country in your database. From there, it's trivial, you just repopulate the state list based on the value selected in the country list.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi ,
Iam newbee in foxpro.
I tryed to create foxpro database via program using the foolwing code.but it throw the error
ADOX.CatalogClass dbcreate;
dbcreate = new ADOX.CatalogClass();
string conPath = "Driver= {Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=C:\\Tamil\\FPDB.dbc";
con.ConnectionString = conPath;
dbcreate.Create(conPath);
MessageBox.Show("Sucess");
|
|
|
|
|
What is the error ? Does Fox Pro support creating databases like this ? Why are you using FoxPro ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi all
i have got a doubt
now i have 5 webpages every page has got database operation..
now while using database which way is cheap work to the server
1) opening connection and closing it when ever page requires a database connection
or
2)keep it open the database connection and close it when application is getting closed
|
|
|
|
|
kalyan_2416 wrote: now i have 5 webpages
you might want to try the Asp.Net forum for your web based questions
Also, the information regarding the architecture you have is insufficient. Can you enter each page independently of the others? or are they in some sort of order?
in either case, its usually better off to abstract your database operations& and therefore connection) to a separate layer.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
|
|
|
|
|
As long as you have database connections in the pool and you close/dispose of the connections, and you use the same connection string to connect to the database, then option 1 is going to be the better solution. Option 2 means that you have to leave a connection open - which is bad news if the server wants to recycle the database process, or the connection disappears for some reason and you attempt to do a database operation with a connection that is no longer valid.
Never design a system that keeps a resource open any longer than it necessarily has to - it just doesn't scale well.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
can anyone help me out about inheritance?
i have a base class inherited from a usercontrol. This base class contains a imagelist with 12 bitmaps and a datagrid, build in designtime.
Now i created 10 new classes inherited from my base class and weird as it is. the image list is copied and not inherited. changing the bitmaps in the base class doesn't change the ones in the other 10 inherited classes..
result is that i have to modify it for each of the classes. Another bad thing is that each class hass his own resource file containing the bitmaps. so 75kb x 10 = 750kb. i suppose this is no inheritance like i known it in Delphi, this is copying source.
Is there a way prevent copying the bitmaps but actually inheriting?
thx
Kurt
|
|
|
|