|
I did drop only two TextBox-es one for username next for password.
But how can i write code to checked in SQLServer username and password then to back me response???
|
|
|
|
|
1 :When you reply just click on the message and then there is a link called reply just click on it ,instead of launching a new thread.
2 : Create a database and then any table in it called USERS for example ,and add fields called username and password ,etc... .
And then try to ckek it by using a datareader to check if it's in the database or otherwise.
|
|
|
|
|
In one my appliation whicha i create by C# i need in page_Load to show me a new form in wich I must give username and password. So can somebody help me how to coding for username and password which's must analysed in SQLServer then to get back me a response.
If username and password is incorrect get error.
If username and password is correct get show next page.
HELP
|
|
|
|
|
Try to make another form in your project that contains only 2 textboxs ,and then try to code this ,and if any problem presents we will help you so much more.
|
|
|
|
|
I am trying to create a main table from a dataset that may have mutiple tables all with the same structure any clues. I need to end up with one table at the end where am i going wrong as i get the error table1 already belongs.
here is my code
//get all table into one ready to show and print
DataTable tblNew;
tblNew = dst.Tables[0].Copy(); //get the sructure and data
for(int i = 1;i
|
|
|
|
|
Do you mean you want to add all the tables in this dataset to that table ?after each other ?
|
|
|
|
|
the user suplies me with say 5 tables all schemas are identical, I want to take all the rows from the 5 tables and crew a new single table containg all the rows from the 5 tables so as i end up with one single table(then not interested in what happens to the original 5 tables) As I need to end up with dst.writexml with only one table being printed and not 5 as i can use that in my crystal report.
|
|
|
|
|
lets say that they are in an array :
DataTable[] tbls = new DataTable[5];
DataTable final = new DataTable("All");
for(int i=0;i<5;i++)
{
foreach(DataRow r in tbls[i].Rows)
{
this.final.Rows.Add(r);
}
}
Hope that helps.
|
|
|
|
|
I want to create an Access database on my PocketPC (WinCE4.2, PocketPC 2003 OS). Then using C# to populate tables, query tables, ...
From a simple search on Google.com I find that I must use ADOCE.NET but I didn't succeed to download it and also didn't see any control that I can use from Visual Studio 2003 (I created a project for Smart Mobile Device).
Is there any one has experiences doing such kind of work?
Best regards,
A. Riazi
|
|
|
|
|
Hi,
In a interface i am using private access specifier , will compling will it give error or not, if it give error then what is that error.
thanks
|
|
|
|
|
NO! its not allowed to put any access modifier behind function defination in interface, be it private, public, protected or internal.
Ali
|
|
|
|
|
Using a private in an interface is illogical.
The private specifier is telling the compliler that the method/property/field is accessible to ONLY other members of this specific class. As interfaces have no implementation nothing could ever use something declared as private within an interface.
As a general note: Interfaces are definitions for part of an exposed parts of a class so that other code can see that a class implements an interface and therefore know that it can call certain methods or properties even if it knows nothing else about the class.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hi,
if two methods having same signature but different return type then also we can say that is overloading?
Example:=
int sum(int x,int y)
{
//some code
}
string sum(int x,int y)
{
//some code here
}
Plz tell me, thanks
|
|
|
|
|
In my views, yes we can say this 'Overloading'
Ali
|
|
|
|
|
|
mowli wrote:
if two methods having same signature but different return type then also we can say that is overloading?
Computer says no.*
This is not valid because the compiler won't know what method implementation to run.
Consider the following call:
Console.WriteLine("{0}", sum(1,2)); Which of the two methods should it call? Console.WriteLine can accept an int or a string here, so the compiler wouldn't know what to do.
If you try and run this you will get a compiler message along the lines of "myClass already defines a member called 'sum' with the same parameter types"
* As you can tell, I've been watching Little Britain recently.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
I have a dataset that I read from an xml file using
DataSet.ReadXml(fs);
I then add to the dataset and rewrite the xml file using the following:
DataRow newrow = mf.quotesDataSet.Tables["quote"].NewRow();<br />
newrow["thequote"] = quoteInput.Text;<br />
newrow["speaker"] = speakerInput.Text;<br />
newrow["origin"] = originInput.Text;<br />
newrow["image"] = "test.jpg";<br />
mf.quotesDataSet.Tables["quote"].Rows.Add(newrow);<br />
mf.quotesDataSet.WriteXml(fw);
It does add the data, however, it adds it outside the main xml hierarchy. For example, instead of:
<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>new text</thequote></quote><br />
</channel><br />
</rss><br />
it writes to the file as:
<rss><br />
<channel><br />
<quote><thequote>text</thequote></quote><br />
<quote><thequote>text</thequote></quote><br />
</channel><br />
</rss><br />
<quote><thequote>new text</thequote></quote><br />
how do I make the added rows to the dataset write into the proper hierarchy?
|
|
|
|
|
Hi all,
What is the best way to find out what dll to add to a project.
eg:- compiler says you need a namspace and reference to a dll for Server in 'Server.ScriptTimeout'.
Yes but what dll is needed?
How do you find out quickly which dll?
Thanks.
|
|
|
|
|
Hi!
How should the compiler know?
You're using a class Server , the code itself is syntactically correct, if Server is a known class, but where Server is defined cannot be determined until you tell the compiler by adding the reference.
Regards,
mav
|
|
|
|
|
Yes thanks.
But it is Catch22!
Some dll's are not install by default and you have to add the dll.
But how do you know which dll to install then add to the code with the 'using' statement.
You guys must use some tool/lookup method of finding the correct dll to reference that has the functionality that you require?
I've found http://www.dotnet247.com so far.
|
|
|
|
|
Are you referring to assemblies containing your own types or third-party components?
If they are your own assemblies, you and you alone know which types are compiled into which assembly.
If it's a third-party component, they must tell you which dll hosts which type and what to install in order for the component to work correctly.
Then you can set your reference according to this info.
But just by giving a classes name (like in your example) the compile cannot determine where to find it and which to use. You can have a zillion valid assemblies on your harddisk each defining a class Server (debug/release builds, different versions, incidental name collisions, ...). Which one do you want to use? I guess you don't want the compiler to pick one at random, do you?
To find a .NET type in assemblies you can use Lutz Roeders Reflector[^], for example.
If you need a COM reference you can use the OLE/COM object viewer available with VS.NET.
Regards,
mav
|
|
|
|
|
How can I initialize components readOnly properties at design-time?
|
|
|
|
|
Do you mean at run-time!? In design time you just select the values from the property window.
|
|
|
|
|
Thank you for reply.
I mean value initialization for readOnly properties via constructor.
But component has only two constructors (empty and with IContainer parameter).
So, components properties must have getters and setters.
To make property a readOnly at run-time I used Site.DesginMode flag in setters:
public int IntProperty<br />
{<br />
get<br />
{<br />
return intProperty;<br />
}<br />
set<br />
{<br />
if(this.Site.DesignMode)<br />
{<br />
this.intPropery = value;<br />
}<br />
}<br />
}
|
|
|
|
|
Hi,
i went for an interview, in that they asked one Question like that..
I am including one dll in to my application, then .Net sdk automatically copies that dll in to my bin folder, but i want to ristrict it from coping into my folder, can i do this? if yes how can u do that?
plz any one tell me.
thanks
|
|
|
|