|
thanks for ur reply
i tried ur stored procedure but it gives the following error
any idea how can i remove it
"RESTORE cannot process database 'databasename' because it is in use by this session. It is recommended that the master database be used when performing this operation.
RESTORE DATABASE is terminating abnormally."
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
I'm Just beginner of learning C#. I designed a login page and registration page.When i entered all the details in registration page, it was stored in a particular database table"Register".After that, i don't know how to allow only the registered users to login to my home page.
modified on Monday, December 21, 2009 2:09 AM
|
|
|
|
|
Check to see if the user is in your database. Read up on ADO.NET, there are thousands of examples.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
How commands "AT Command" SIM card will be charged.
Tasnk.
How commands "AT Command" SIM card will be charged.
|
|
|
|
|
Hi,
This the code i wrote to extract all the users details of an organization across domain
System.DirectoryServices.DirectorySearcher mySearcher = new System.DirectoryServices.DirectorySearcher("gc://dc=xxxdomain,dc=net");
mySearcher.Filter = ("(objectCategory=person)");
mySearcher.PageSize = int.MaxValue;
Console.WriteLine("Listing of users in the Active Directory");
Console.WriteLine("========================================");
using (var searchResultCollection = mySearcher.FindAll())
{
foreach (System.DirectoryServices.SearchResult searchResult in searchResultCollection)
{
foreach (string prop in searchResult.Properties["distinguishedname"])
{
Console.WriteLine("distinguishedname : " + prop.Trim());
break;
}
}
}
I got some output that only fetches the data for a domain where the user resides and not the complete data. Can anyone help me on this what went wrong in the code?
|
|
|
|
|
private void button5_Click(object sender, EventArgs e)<br />
{<br />
Form2 frm2 = new Form2();<br />
frm2.Show();<br />
}
when i run the code ,click button5,not any happened to me,Form1 still Form1,Form2 still not show?it just as have never happened?
what's the reason?thanks every to help me !
|
|
|
|
|
did you assign event handle?
buttion5.Click += new Systen.EventHandle(button5_Click);
If designer did create button5_Click function, then it should assign Click event
|
|
|
|
|
not that,i use button1 and other buttons,it also do not work
|
|
|
|
|
Form2 is being destructed immediately after the Show() method, causing it to be closed.
/ravi
|
|
|
|
|
Hi All
i need to print a departmental store slip on 4.0 inch wide on paper roler.
if any body can help me
thanks
Thaer
|
|
|
|
|
- Connect the printer to your computer and ensure all drivers are installed.
- See this[^] article.
/ravi
|
|
|
|
|
i m programatically building a datatable and populating that datatable with data from a text file.nw i m assigning that datatable to report viewer but report viewer is not showing any data.here is my code
if (counter != 0)
{
for (int j = 0; j < counter-1; j++)
{
fieldValues = file.ReadLine().Split(new char[] { '\t' });
DataRow dr = dt.NewRow();
for (int i = 0; i < fieldValues.Length; i++)
{
dr[i] = fieldValues[i].ToString();
}
dt.Rows.Add(dr);
}
}
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
this.reportViewer1.LocalReport.ReportPath="C:\\Documents and Settings\\amohiuddin\\My Documents\\Visual Studio 2008\\Projects\\sample reporting application\\sample reporting application\\Report1.rdlc";
this.reportViewer1.LocalReport.ReportEmbeddedResource = "sample reporting.Report1.rdlc";
this.reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.DocumentMapCollapsed = true;
this.reportViewer1.DataBindings.Clear();
this.reportViewer1.LocalReport.DataSources.Add(rds);
this.reportViewer1.Show();
this.reportViewer1.RefreshReport();
}
can someone tell me what i m missing?
|
|
|
|
|
Try without refreshing the report at last, may be this will help you
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
I've got a large Azure/C# project ahead. I was ready to
install Win7, but I'm not sure whether there are marked
advantages or disadvantages to using 32-bit vs 64-bit.
The project is mostly C#, which could be 32-bit or 64-bit,
but it will include at least one legacy unmanaged 32-bit DLL.
We haven't decided how to deal with the DLL yet...maybe a
wrapper, or maybe just set it up as a separate process that
will talk to managed code via TCP/IP (seems like comm options
are limited).
We'll also need to deal with a couple other unmanaged apps
that won't be going into Azure-land. But development concerns
would still relate.
If you can think of any notable advantages or disadvantages
in 32-bit vs 64-bit, I'd appreciate your insight.
|
|
|
|
|
Like others users some prefer using 32bit instead 64 bit, such as myself. My reason is this: Windows 64bit has a poor support and often doesn't work properly with 32 bit app
|
|
|
|
|
Hello, I'm new to the forum here. I'm currently using the Windows mobile 6 to create a database from the SQL Compact database edition. I'm currently facing this problem clearing of database. This is the code snippet below. I'm grateful for any help given. Thanks.
conn.Open();
SqlCeCommand cmd = conn.CreateCommand();
//cmd.CommandText = " DROP TABLE LOCATION";
cmd.CommandText = "DELETE from LOCATION where No = @No";
//=@No, DateAndTime=@DateAndTime,LocationInformation=@LocationInformation ";
-- cmd.ExecuteNonQuery(); -- This is the line where the error surfaced. "SqlCeException was mishandled (A parameter is missing. [ Parameter ordinal = 1 ] )"
this.Refresh();
conn.Close();
Codenoobie
|
|
|
|
|
In your delete query you have specified a parameter "@No" but you have not added that parameter to your SqlCeCommand object.
cmd.Parameters.AddWithValue("@No", Value);
Just replace Value with a variable that has the value of No that you want to delete.
|
|
|
|
|
Actually, "No" is the fieldname of the database, can i still use this approach to clear the database?
//---create the two tables---
SqlCeCommand cmd = new SqlCeCommand(
"CREATE TABLE LOCATION(No int " +
"identity(1,1) PRIMARY KEY, " +
"DateAndTime nvarchar(80)," +
"LocationInformation nvarchar(80))", conn);
cmd.ExecuteNonQuery();
codenoobie
|
|
|
|
|
OK basic SQL Language lesson, the command;
DELETE FROM LOCATION
Will clear ALL the data from the table LOCATION, if this is all you want to happen use the following SqlCeCommand code;
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE FROM LOCATION";
However the query you have in your code is;
DELETE FROM LOCATION WHERE No = @No
Take note of the "@No" value, this is a parameter that you need to supply a value for.
What this is saying is to delete the records from the LOCATION table where the No field is equal to the @No parameter. This is why the error message you are receiving is "SqlCeException was mishandled (A parameter is missing. [ Parameter ordinal = 1 ] )", this is telling you that you have not supplied a value for the first parameter in your query, which is "@No"
If you use;
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "DELETE from LOCATION where No = @No";
cmd.Parameters.AddWithValue("@No", Value);
This will only delete the records from the LOCATION table where the No field is equal to the value you supply for the @No parameter.
|
|
|
|
|
This is really really a late reply but I'm really grateful for your help, Thank you =)
|
|
|
|
|
Hi,
I have a html code dynamically generated from my server and i want to display it in windows form. inside any control which could do that. I don't want to implement the full web browser control. 'cause i am not going to display a browser but just the html output. What could be the options in C#?
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
The WebBrowser control is the only reasonable way to do it.
|
|
|
|
|
Thanks. i included the webbrowser control and it is appearing well as expected by making this property false. webBrowser1.AllowWebBrowserDrop = False
Now i have html code and i want to render that in the browser control instead of giving a url.
This html code is dynamically generated by me from my local system. ?
meanwhile i will try to find that out from msdn ....
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
yep. read the MSDN documentation on WebBrowser, discover the DocumentText property, and don't forget to disable some interactions through other properties if you want it for output only.
modified on Sunday, December 20, 2009 3:17 PM
|
|
|
|
|
Yes. Now i got it all into my program and it is working as expected.
My program connects to a server script through socket, gets the response and render it as html.
First i wrote it in C (WIN32 API) but displayed only as text. The size was 130kb and here it is just 20kb.
I guess object codes were totally compiled into a final exe for sdk and with respect to C# it should be cause of the framework which reduces the size like visual basic 6.0. I am new to c# just a few days back i started this . so was this question from a novice.
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|