Thank you,Shameel. this answer is what i need.
Morven Huang
Posts
-
node EmbeddedResource in *.csproj file? -
node EmbeddedResource in *.csproj file?Yes, but i mean why they are different? for instance,some have sub-node 'DependentUpon', some don't. Are there any hidden law here?
-
node EmbeddedResource in *.csproj file?Hi all, i looked into several .csproj files today, and i found that node 'EmbeddedResource' are different from each other,i'm curious to know what results in this? anyone have any idea regarding this? (1) <EmbeddedResource Include="Form1.resx"> <DependentUpon>Form1.cs</DependentUpon> </EmbeddedResource> (2) <EmbeddedResource Include="FormAbout.resx"> <SubType>Designer</SubType> <DependentUpon>FormAbout.cs</DependentUpon> </EmbeddedResource> (3) <EmbeddedResource Include="CommonText.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>CommonText.Designer.cs</LastGenOutput> </EmbeddedResource>
-
The work is done,why does Process.WaitForExit() still block the thread?Hi everyone, I run into a tricky issue when I run cmd.exe using Process class in C#. 1)Here's the C# code,it run the specified .bat file in command-line: m_BasicDataProc = new Process(); m_BasicDataProc.StartInfo.FileName = "cmd.exe"; m_BasicDataProc.StartInfo.CreateNoWindow = false; m_BasicDataProc.StartInfo.UseShellExecute = false; m_BasicDataProc.StartInfo.RedirectStandardOutput = true; m_BasicDataProc.StartInfo.RedirectStandardInput = true; m_BasicDataProc.StartInfo.WorkingDirectory = Path.GetDirectoryName(batchFilePath); m_BasicDataProc.Start(); string batchFileName = Path.GetFileName(batchFilePath); string ipLine = batchFileName;StreamWriter inputStream = m_BasicDataProc.StandardInput; inputStream.WriteLine(ipLine); inputStream.Close(); m_BasicDataProc.WaitForExit(); m_BasicDataProc.EnableRaisingEvents = true; 2)In the .bat file,it calls a .vbs file with the content pretty much like this: option explicit dim fso Set fso = CreateObject("Scripting.FileSystemObject") Dim CreateFile Set CreateFile = fso.CreateTextFile("InstallScripts\CreateTriggers.sql", true) ...... CreateFile.writeLine(strStatement) CreateFile.WriteLine set CreateFile = nothing set fso = nothing // I found that the file CreateTriggers.sql was created successfully,it means that the work of this .bat file is finished,but it's really odd that the application is still blocked by the code line "m_BasicDataProc.WaitForExit();" and could not exit. Has anyone been in same situation? Anything you could help would be appreciated!
-
Is it possible to get result set from a Oracle store procedure via ODBC?Hi guys, I got a Oracle store procedure which would return dataset using a ref cursor,it's quite easy to get the result set if I use the classes in System.Data.OracleClient because there's a type OracleType.Cursor which matches the procedure parameter's type. But is it possible to do this via ODBC? There isn't a type likes 'OdbcType.Cursor'. Anything you can help it would be appreciated. :)
-
How to generate odbcDataAdapter.TableMappings?Hi guys, I wrote this: string cmd = "select fid,fval from x"; OdbcDataAdapter da=new OdbcDataAdapter(cmd,this.odbcConnection1); int i = da.TableMappings.Count; and I found da.TableMappings.Count was always zero. I don't want to use da.TableMappings.Add() function to add table mapping and columns mapping. Are there any functions in ADO.NET that can generate the mapping info base on a odbcDataAdapter instance? Anything you can help it would be appreciated.
-
How to stop VS to load user controls into toolbox?Thank you for your answer.Yes,it does work!!
-
How to stop VS to load user controls into toolbox?Hi guys, There're many user controls in my current project,and VS always initializes and loads these controls into toolbox,sometime it costs me 20 minutes to finish this,and in this 20 minutes VS is no response and I can do nothing. So I'm curious to know if there's a way to stop VS to do this. Anything you can help it would be appreciated!
-
Where Do I Start Learning About Using SQL Databases in C# Applications?install a mssql,then use it,it's better to practice,
-
Calling A form by its name which is saved as text in a table .use reflection,you can find the guideline about using this from msdn or google,it's quite easy..
-
When using reflection,how to get the field without creating a instance?Thanks everybody.
-
When using reflection,how to get the field without creating a instance?Hi everyone,now I have a winform Form1,in Form1,there is a TextBox1,and its Text is "abcd". In the other project,I want to get the Text of TextBox1,as below: Assembly assembly = Assembly.LoadFrom(@"ClassLibrary1.dll"); Type[] types = assembly.GetTypes(); FieldInfo[] fis; System.Windows.Forms.TextBox tb; for (int i = 0; i < types.Length; i++) { fis = types[i].GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); for (int j = 0; j < fis.Length; j++) { if (fis[j].FieldType == typeof(System.Windows.Forms.TextBox)) { tb = fis[j].GetValue(Activator.CreateInstance(types[i]))as System.Windows.Forms.TextBox; Console.WriteLine(tb.Text); } } } Console.Read(); But I have to create a instance "Activator.CreateInstance(types[i]))".Are there any ways that I can get the Text without create a Form1 instance? Anyone who can help it would be appreciated.
-
Transfer data from excelsheet to datatableYou can simply use ODBC to read data from excel to datatable.
-
How to get another DataTable from original DataTable?maybe you need ot clone the table structure from source datatable,like 'dt=data.Clone()',then import rows.
-
Do you care the technology when choosing a project?No,what you actually need is to learn it,then you'll obtain another skill.
-
Anyone here can read Chinese?Thanks. I can read english well,but seems it is much more difficult to write in english,so i think maybe i need someone to talk to in english,and he/she can check if there is a mistake in what i said.
-
Anyone here can read Chinese?Thanks!
-
Anyone here can read Chinese?Sorry to bother you guys. My english is poor,now i'm in Ericssion(China),i'm in big trouble writing or saying english...I need to improve my english,anyone can help me? Thanks in advance. Morven Huang Beijing China
-
OH Man Or Oh Mad?maybe 'oh man,u suck'
-
why TermsOfUse.aspx? [modified]Thanks everybody,I have fixed this issue: click the link "My Settings",on this page,ensure that the last checkbox is checked.Then sign in again.
modified on Wednesday, August 20, 2008 8:36 PM