|
Can anyone please let me know how to get tab pages alignment downside.
This is with respect to the Tab Strip Control at the following url
http://www.codeproject.com/cs/miscctrl/TabStrip.asp
It has no such property which normal tabstripcontrol has
|
|
|
|
|
hot to get root of virtual directory,such as wwwroot!
thank you!
KSCsoft
|
|
|
|
|
how to get System Root of Virtual Directory with C#,such as wwwroot!
thank you!
KSCsoft
|
|
|
|
|
There is Request.MapPath(virtualPath) which returns you the physical path if you know what the virtual path is. There's also Request.PhysicalApplicationPath which returns you the physical path to your web application.
Does that help?
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Thank you for your help firstly.but I just wanna get the root of the virtual directory(wwwroot),and use the Windows Application!
thank you!
KSCsoft
|
|
|
|
|
Ah, I misread your question. Perhaps this link[^] can help?
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
I have piece of code which extracts the sql queries stored in xml files
following is the xml file (Purposely instead of single angle double starting and closing angles are used in order that xml file gets displayed and tags are not ignored )
======================================================================
<<xml version="1.0" encoding="utf-8">>
<<queries>>
<<loginclient>>"select chrid,chrname from mclient where UserName="+"'"+ txtusernamec.Text+"' and pwd ='"+txtpasswordc.Text+"'"<>
<<loginsubscriber>>select * from msubscriber<>
<<loginrm>><>
<<loginbackuser>><>
<<queries>>
====================================================================
The piece of code that tries to retrieve queries from xml file is
XmlDocument _xdoc = new XmlDocument();
_xdoc.Load(Server.MapPath("KmukQueries.xml"));
XmlNodeList xtemp = _xdoc.GetElementsByTagName("LoginClient");
string temp = xtemp[0].InnerXml.Replace(@"\","");
====================================================================
however the ultimate string that is stored in temp is
"\"select chrid,chrname from mclient where UserName=\"+\"'\"+ txtusernamec.Text+\"' and pwd ='\"+txtpasswordc.Text+\"'\""
but the desired string is
"select chrid,chrname from mclient where UserName="+"'"+ txtusernamec.Text+"' and pwd ='"+txtpasswordc.Text+"'"
Please suggest what could be done ..
for the current needs of project i cannot store query in xml file in form of
select * from abc where xyz = ? and pqr = ?
|
|
|
|
|
Hello
My problem is that i want to save (convert) my projects each form in dll format. I'm working on windows forms. I know how we can create dll custom controls.
For this I create new Custom Control Project and add my existing form to it and then i compile that, about referencing another forms that not available in this project that shows errors.
Is another way to make DLL files from project forms to keep their structure hidden.
Thanks.
|
|
|
|
|
If your forms rely on each other at all, this is going to get messy. You want to put each form into a dll ? Sounds like a nightmare to me.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
create the new empty forms,copy code from the old forms you need!
KSCsoft
|
|
|
|
|
Hi,
I'm creating log file(Notepad) for my application which includes Category,Date Time, Source Line, Message as a column. I need to have each as column and when i export it to Excel it should accomdate in individual column. How can i accomplish this.
|
|
|
|
|
I think , first you can import this to datagrid and there are lots of articles which can help you to export to excel ..
following is the code snippet that may solve your problem
step 1 include this class to read read the value from text file
public class TextToDataSet
{
public TextToDataSet()
{
}
public static DataSet Convert(string File,
string TableName, string delimiter)
{
DataSet result = new DataSet();
StreamReader s = new StreamReader(File);
string[] columns = s.ReadLine().Split(delimiter.ToCharArray());
result.Tables.Add(TableName);
foreach(string col in columns)
{
bool added = false;
string next = "";
int i = 0;
while(!added)
{
string columnname = col + next;
columnname = columnname.Replace("#","");
columnname = columnname.Replace("'","");
columnname = columnname.Replace("&","");
if(!result.Tables[TableName].Columns.Contains(columnname))
{
result.Tables[TableName].Columns.Add(columnname);
added = true;
}
else
{
i++;
next = "_" + i.ToString();
}
}
}
string AllData = s.ReadToEnd();
string[] rows = AllData.Split("\r\n".ToCharArray());
foreach(string r in rows)
{
string[] items = r.Split(delimiter.ToCharArray());
result.Tables[TableName].Rows.Add(items);
}
return result;
}
}
step 2
fill the contents of the text file to the dataset using following syntax
DataSet dsupdate = TextToDataSet.Convert(System.Web.HttpContext.Current.Server.MapPath("./LogFiles/ErrLog.txt"),"errorhandlerlog","$");
here convert is the static method of the class
Now 50 % of work is over you can either bind the dataset to the datagrid and refer other articles on code project which are on exporting dataset to excel or datagrid to excel . Exporting the text file directly to excel may not help when you want to debug or in case of some unknown error.
Hope this give you litte comfort for your problem
|
|
|
|
|
Hi
iam having a problem in coverting ms acess query to sql query,plz help me if u know the answer it is urgent.
|
|
|
|
|
Micrsosoft Access uses SQL, so your query is already SQL.
Is it perhaps Micrososft SQL Server that you want to convert the query for?
It's a bit hard to help you with converting the query without seeing it.
---
b { font-weight: normal; }
|
|
|
|
|
thanks for your reply.
this is the ms acess query(while converting to sql server it creates problem)
SELECT tblEmployee.Emp_Id, tblEmployee.Emp_FName, tblEmployee.Emp_LName, tblClockDetails.Clk_InDate, tblClockDetails.Clk_InTime, tblClockDetails.Clk_OutDate, tblClockDetails.Clk_OutTime, tblProcessedData.pHrsWork, tblProcessedData.pHrsOT, tblProcessedData.pNormOT, tblProcessedData.pOffOT, tblProcessedData.pHolOT, tblProcessedData.pEarlyOut, tblProcessedData.pLateIn, tblProcessedData.pLeaveType, tblDepartment.Dept_Id, tblDepartment.Dept_Name, tblSection.Sec_Id, tblSection.Sec_Name, (CDate([tblClockDetails.Clk_InDate] & " " & [tblClockDetails.Clk_InTime])) AS ClockIn, CDate([tblClockDetails.Clk_OutDate] & " " & [tblClockDetails.Clk_OutTime]) AS ClockOut, DateDiff("n",ClockIn,ClockOut)\60 & ":" & DateDiff("n",ClockIn,ClockOut) Mod 60 AS Totalhrs, Format(Totalhrs,"Short Time") AS TotHrs
FROM ((((tblEmployee INNER JOIN tblEmpWork ON tblEmployee.Emp_Id=tblEmpWork.Emp_Id) INNER JOIN tblDepartment ON tblEmpWork.Emp_DeptId=tblDepartment.Dept_Id) INNER JOIN tblSection ON tblEmpWork.Emp_SecId=tblSection.Sec_Id) INNER JOIN tblProcessedData ON tblEmployee.Emp_Id=tblProcessedData.pEmpId) INNER JOIN tblClockDetails ON tblEmployee.Emp_Id=tblClockDetails.Clk_EmpId
WHERE tblClockDetails.Clk_OutTime <> "" and tblClockDetails.Clk_InTime <> "" and (((tblClockDetails.Clk_InDate)>=(SELECT FromDate FROM tblDateRange) And (tblClockDetails.Clk_InDate)<=(SELECT ToDate FROM tblDateRange)) AND ((tblEmpWork.Emp_Report)='Y')) AND tblClockDetails.Clk_InDate = tblProcessedData.pDate;
the problem arises for
(CDate([tblClockDetails.Clk_InDate]-CDate isnot a recognised function name and then how to cnvert Mod 60 in to sql server.
|
|
|
|
|
leelaraj wrote: CDate isnot a recognised function name
Use: cast(x as datetime)
leelaraj wrote: how to cnvert Mod 60 in to sql server
Use: % 60
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much...its working fine.
|
|
|
|
|
Please help me solve this problem:
I wanna run an application with parameters, when i use these commands, the program doesn't work.
<br />
<br />
System.Diagnostics.Process p = new System.Diagnostics.Process();<br />
p.StartInfo.Filename = "gSpan.exe 10 set2.gsp out2_1";<br />
p.Start();<br />
<br />
"gSpan.exe" is a program coded by VB6.0
"10 set2.gsp out2_1" are 3 parameters that gSpan.exe needs.
Thanks much
-- modified at 23:17 Tuesday 20th June, 2006
|
|
|
|
|
Use the Arguments property of the StartInfo, or put the filename and arguments in the call to the Start method.
---
b { font-weight: normal; }
-- modified at 0:43 Wednesday 21st June, 2006
|
|
|
|
|
hi there,
Im a student from singapore...i happened to find this website and found the articles to be very interesting and informative.However im now assigned a C# windows application proj and i have some questions on it as i have no programming background.Would anyone be able to help me?maybe u can send me some resources or similar source code regarding : using VS 2003 or 2005 to create a windows application whereby i am access to modify,add,delete,sort and filter a database in Excel format... thanks in advance
|
|
|
|
|
Microsoft is a good source of information of "how to" develop Microsoft Windows applications that automate Microsoft products using Microsoft development tools. http://support.microsoft.com/?kbid=306023[^]
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
hi thanks for the help..but i think u have misunderstood me.. the link u gave was for transferring data from the windows application to excel format but it is not what i want.. i need something to do with SQL to link my EXCEL DATABASE TO the windows application.. any guidance is deeply appreciated
|
|
|
|
|
skyeddie wrote: my EXCEL DATABASE
If you are referring to "Microsoft Excel" then the link I provided gives you exactly what you asked for. If it is NOT Microsoft Excel then I don't know what it is and you need to provide an URL to the Database products web site.
|
|
|
|
|
hi thanks for the help..but i think u have misunderstood me.. the link u gave was for transferring data from the windows application to excel format but it is not what i want.. i need something to do with SQL to link my EXCEL DATABASE TO the windows application.. any guidance is deeply appreciated
|
|
|
|
|
you can follow following:
1.use the wizard tool.microsoft VS.net 2003 SDK can automatic create code.
2.use the MSDN.MSDN is a strong tool,you can search everything you don't know.
3.just purchase book to read!
KSCsoft
|
|
|
|