|
I am using two tables because one for displaying the contents of the selected row in Displaytable when user send data through text box and other one is used for maintable (getting the data for displaytable).
I donot have any problem to use one table but I donot know how to use and display the contents of the selected 10 row.
If user modify one row or delete how to update the maintable.
|
|
|
|
|
Basically, I have xml format table that's why I am using two table( I guess so)
|
|
|
|
|
You only need one table. When user updates the value, update it to database and refresh your table with latest values.
|
|
|
|
|
When I Print from my computer life is good. when I print from the SQA computer life - not so good.
My box Windows XP sp 2
SQA Windows 2003 SE SP 2
Using the local system account results in the following error:
[2009/08/31 17:19:49.392] System.ComponentModel.Win32Exception Access is denied
File Name : Method : StandardPrintController.OnStartPrint Line Number : 0
File Name : Method : PrintControllerWithStatusDialog.OnStartPrint Line Number : 0
File Name : Method : PrintController.Print Line Number : 0
File Name : Method : PrintDocument.Print Line Number : 0
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrinterStrategy\LocalPrinter.cs Method : LocalPrinter.OutputContext Line Number : 71
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.printHelper Line Number : 94
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.Print Line Number : 44
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrintManager.cs Method : PrintManager.ProcessPrintRequest Line Number : 160
If I enter a specific user account, and validate Both RPC services are running, the error changes to:
[2009/09/03 10:10:06.595] System.ComponentModel.Win32Exception The RPC server is unavailable
File Name : Method : StandardPrintController.OnStartPrint Line Number : 0
File Name : Method : PrintControllerWithStatusDialog.OnStartPrint Line Number : 0
File Name : Method : PrintController.Print Line Number : 0
File Name : Method : PrintDocument.Print Line Number : 0
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrinterStrategy\LocalPrinter.cs Method : LocalPrinter.OutputContext Line Number : 71
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.printHelper Line Number : 94
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\Configuration\PrinterElement.cs Method : PrinterElement.Print Line Number : 44
File Name : c:\CATOS6.7.1\CATOS6\CATOS.NET\PServer\Core\PrintManager.cs Method : PrintManager.ProcessPrintRequest Line Number : 160
I am out of ideas, Any thoughts are welcome
The Framework code, StandardPrintController, causing me grief:
public virtual void OnStartPrint(PrintDocument document, PrintEventArgs e)
{
IntSecurity.AllPrintingAndUnmanagedCode.Assert();
this.modeHandle = document.PrinterSettings.GetHdevmode(document.DefaultPageSettings);
}
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
Hi All Wizards....
I have this code as an entity and it is working perfectly, but now I try to create the collection for this entity... Can't seem to get it rights... Really need help on this... Thank you all in advance...
Actually, what I try to do is this... I can get only 1 record from the db back at a time, but I want to get nultiple return records from the db....
Here comes the sample codes for entity...
namespace Testing.DataLayer
{
[Serializable]
public class Selected_DocType
{
string userID;
string password;
string doctype;
string fileshortdescription;
public string UserID
{
get { return userID; }
}
public string Password
{
get { return password; }
}
public string DocType
{
get { return doctype; }
}
public string FileShortDescription
{
get { return fileshortdescription; }
}
public Selected_DocType( string userID
, string password
, string doctype
, string fileshortdescription
)
{
this.userID = userID;
this.password = password;
this.doctype = doctype;
this.fileshortdescription = fileshortdescription;
}
public static Selected_DocType GetWebSelected_DocType(string userID, string password)
{
Selected_DocType t = null;
using (SqlConnection conn = Database.CreateConnection())
{
SqlCommand cmd = StoredProcs.GetWebSelected_DocType(conn);
cmd.Parameters["userID"].Value = userID;
cmd.Parameters["password"].Value = password;
cmd.ExecuteNonQuery();
t = new Selected_DocType( userID
, password
, (string)cmd.Parameters["DocType"].Value
, (string)cmd.Parameters["FileShortDescription"].Value
);
return t;
}
}
}
}
|
|
|
|
|
I prefer Necromancer rather than Wizard
t = new Selected_DocType( userID<br />
, password<br />
, (string)cmd.Parameters["DocType"].Value<br />
, (string)cmd.Parameters["FileShortDescription"].Value<br />
Of course you are only getting one object because that is all you are creating.
You also need to call ExecuteReader and iterate through the results returned to create all the objects. Learn the difference between ExecuteNonQuery and ExecuteReader and the other methods for SqlCommand
only two letters away from being an asset
|
|
|
|
|
Thank you for your replied...
And, that where I got stuck in.... Using the ExecuteReader to get the records back and using the while {} loop - I am OK with that. But how to:
1. Define the collection for data finding (is it similiar to define an entity?)
2. Populate the records into the collection
Hope you got what I said... Thank again
Oceanic679
|
|
|
|
|
Please do us, and yourself, a favor and go read some books or take a class before posting here again.
We are more than willing to help, but creating a collection and populating it is a very, very basic task.
only two letters away from being an asset
|
|
|
|
|
not problem... thank you for mentioned... Just need an ideas as too many info on the web in the related subject... sometimes make yourself confused...
|
|
|
|
|
Oceanic679 wrote: Actually, what I try to do is this... I can get only 1 record from the db back at a time, but I want to get nultiple return records from the db....
Are you using some sort of entity framework ? If not, then I'd expect to read a table from the DB, iterate over it, and create a list of the type of object.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
No... I am not... I want to create a collection as I already define an entity for single record, and need to know how to do it... Thank you...
|
|
|
|
|
Thank you to you all.... Got it working...
|
|
|
|
|
kindly give me small and simple example of this
Thanks in Advance
|
|
|
|
|
No
only two letters away from being an asset
|
|
|
|
|
Did you even try to google[^]?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Go to your boss, tell him you are unable to do the task at hand due to insufficient education and/or knowledge. Ask him kindly to give the work to someone capable.
|
|
|
|
|
EliottA wrote: Ask him kindly to give the work to someone capable.
You never know, this guy may come back to you asking for code example for saying this to boss
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
This is very difficult. It requires many years of experience.
Only a c# veteran is capable of performing this feat.
Good luck.
|
|
|
|
|
I am working on software in that i need to print certain things....... which is the easy way........ kindly help
|
|
|
|
|
amaankhan wrote: which is the easy way
The easiest way is give us more details. What exactly is "certain things"?
only two letters away from being an asset
|
|
|
|
|
i want to print Employee Details on the paper ok......my question might be stupid....... sorry i am new to programming field...... with no experience
Thanks for reply
|
|
|
|
|
It's not your ability to program or the fact that the question may be stupid. The problem is your ability to communicate a complete idea so someone can figure out exactly what you're talking about.
|
|
|
|
|
Print to where? To a screen or to a printer? Please read the forum guidelines and rephrase your question.
|
|
|
|
|
i have to print the Employee Details on the paper
|
|
|
|
|