Even though i have not yet tried your code in my machine (VS 2010) because you are showing the code in a different approach, but my need/question is different. I agree that if i runs your code it will work fine if table is having Unicode Strings in the columns; but my question is "How i will give Unicode Strings in the Textbox to search the table" like : select * from mytable where col1=Textbox1.Text (Here how do i supply Unicode in the Textbox). Whereas, if i were able to store converted strings in the column then i think it is more flexible to handle the data, because now it is converted and editable to any tool. Something like if table is having Unicode values then problem is how do i supply / search in the table using textbox1 and then populate my FlexGrid. I think its going a larger thread on the forum, thats why i gave you my mail id; so that if i gets the final and the complete answer; then i will post your code here; so that other user of the forum may get handy answer as well. Best Regards.
Girish481
Posts
-
Help for code -
Help for codeFirst i really wish to heartly thank to you for your continue support. Thats a really very good, clear and helpful reply for me; but still issues are there: 1.How do i give/type Unicode in the textbox, something like : Select * from mytable where name like '%ओम%' (Here i am copying from your reply) I think if any how i am able to convert this ओम into "vkse" then it is how i wish to store the data in the table. Here "vkse" is the hindi translation of ओम if i select any Hindi font please; or if you still feel that i am not explaning my need properly; please contact at my mail id i.e. gksharmaajmer@gmail.com Thank you.
-
Help for codeI am sorry for being late reply. Probably i am not able to explain my need. See, whatever you have said, that is fine that if i says dim x as string="Hindi Words"; they are visible in the dotnet; but i want to convert them into "editable text", wish to apply some sort of font displays like bold, italic, color change etc. so, that i can say select * from mytable where name like '%Some Search String based upon Hindi words..%'. Here issue is that they are visible in IDE and Textboxes; but how do i give select criteria in the textbox so that database can see the query as mentioned above please. Please let me know : 1.How do i convert Unicode Text to Edibable Text? 2.It would be more helpful if you please show me some code in action. @ the moment; i am reading below link... but Ouch...it is also returning error.... Please scorll down and read the reply posted by Atul Bari... http://nishantpant.wordpress.com/2007/01/04/how-to-convertdisplay-a-unicode-string-in-vbnet/ and the SQL Server Error is : Msg 102, Level 15, State 1, Procedure Hex, Line 11 Incorrect syntax near '‘'. Msg 102, Level 15, State 1, Procedure Hex, Line 20 Incorrect syntax near '‘'. Msg 102, Level 15, State 1, Procedure Hex, Line 29 Incorrect syntax near '‘'. Msg 102, Level 15, State 1, Procedure Hex, Line 38 Incorrect syntax near '‘'. Msg 102, Level 15, State 1, Procedure Hex, Line 52 Incorrect syntax near 'end'. Thank you very much for your continue support.
-
Help for code>What are you trying to achieve? Actually i have got couple of files named like file1.txt, file2.txt etc... and these files are having unicode data too. I have to store these files data into databases like Oracle, SQL Server. So, i was in search to first convert a unicode string to convert it into editable text; i.e. something like : Unicode String is "This is a unicode string" and i wish : New String is : "Something text after conversion"; and then if i select hindi (an Indian Language) font for new string; it will show me the original string as it was in Unicode. Now, here i do'nt know how do i know the complete steps to convert these files into that format; so that i can store those data into databases. Thank you.
-
Help for codeIf it is due to older framework version; then i will test the code on another machine and will post the output/error (if any). Thank you very much for your replies.
-
Help for codeThanks for your reply. Here it is the code:
private void button1_Click(object sender, EventArgs e) { string strValue= "0932;093E;0926;0947;0928;"; Regex rgexp = new Regex(@"([0-9A-Fa-f]{4});"); string strResult= rgexp.Replace(strValue, match => ((char)Int32.Parse(match.Groups[1].Value, NumberStyles.HexNumber)).ToString()); textBox1.Text=strResult; }
And the error : Invalid expression term '>' Even i am not able to resolve the issue from link given by first user please. Thank you. -
Help for codeI am using below code from below link:
using System.Globalization;
using System.Text.RegularExpressions;
string strValue= "0932;093E;0926;0947;0928;";
Regex rgexp = new Regex(@"([0-9A-Fa-f]{4});");
string strResult= rgexp .Replace(strValue, match => ((char)Int32.Parse(match.Groups[1].Value, NumberStyles.HexNumber)).ToString());
Response.Write(strResult);Source:http://www.dotnetspider.com/resources/39073-How-convert-hindi-using-unicode.aspx But there is red line with match = "> (Here it is showing red line)" I am going to convert a Unicode String to Hindi (Indian Language). I am using VS 2005 Prof Edition. Thanks.
-
Problem with ref cursorHello, I am using Oracle 10.2.0.1 and working on a web application using MS VS 2005. Here it is my oracle code :
CREATE OR REPLACE PACKAGE rollsearch AS
TYPE t_cursor IS REF CURSOR;
Procedure rol_cursor(c_rol in varchar2,c_cnm in varchar2,c_fnm in varchar2,
c_mnm in varchar2,d_dob in date,n_year in number,c_exam in varchar2,c_main_supp in varchar2,
io_cursor OUT t_cursor);
END rollsearch;CREATE OR REPLACE PACKAGE BODY rollsearch AS
Procedure rol_cursor(c_rol in varchar2,c_cnm in varchar2,c_fnm in varchar2,
c_mnm in varchar2,d_dob in date,n_year in number,c_exam in varchar2,c_main_supp in varchar2,
io_cursor OUT t_cursor)
IS
v_cursor t_cursor;
v_sql varchar2(1000);
begin
...
...
end rol_cursor;
end rollsearch;At oracle level, no error; it is working fine (in SQL Plus). Here it is my button click code :
Protected Sub Button1\_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Ds As New DataSet() Dim Oraclecon As New OracleConnection("Data Source=orcl;User ID=exam2;Password=exam2") Oraclecon.Open() Dim myCMD As New OracleCommand() myCMD.Connection = Oraclecon myCMD.CommandText = "rollsearch.rol\_cursor" myCMD.CommandType = CommandType.StoredProcedure myCMD.Parameters.Add(New OracleParameter("c\_rol", OracleType.VarChar, 7)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("c\_cnm", OracleType.VarChar, 30)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("c\_fnm", OracleType.VarChar, 30)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("c\_mnm", OracleType.VarChar, 30)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("d\_dob", OracleType.DateTime)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("n\_year", OracleType.Number, 4)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("c\_exam", OracleType.VarChar, 1)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("c\_exam\_supp", OracleType.VarChar, 1)).Direction = ParameterDirection.Input myCMD.Parameters.Add(New OracleParameter("io\_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output myCMD.Parameters.Item(0).Value = Trim(TextBox5.Text) 'Roll Number myCMD.Parameters.Ite
-
Logical Help required with checkedlist boxHi Brij, Thanks for your reply and time given to my problem. Let me once again clear it more: If user selected "All" option with/without First/Second option then no action is required. If user selected First only then deleted those records whose papercode <> 1 Endif If user selected Second only then deleted those records whose papercode <> 2 Endif If user selected First and Second No Action required Endif If user selected All+First+Second No action required Endif Means, only action required on selection of single "First" or "Second" option and wish to perfrom some delete operation on table. Its vb.net 2005 project please. Regards Girish Sharma
-
Logical Help required with checkedlist boxHello, I am working on a school result processing project. I have one checkedlist control which have 3 options:(To choose paper code) All First Second to select the paper code option. All stands for all papers i.e. paper1 and paper2; while if any of other than "All" option checked by user; the respective action should be taken place. Suppose, user checked on option First, then all records whose papercode <> 1; will be deleted by command.ExecuteNonQuery() and if user checked on Second, then all records whose papercode <> 2; will be deleted by command.ExecuteNonQuery(). If user checked on All or any of First/Second; no action is needed; because All option means no action required. Kindly help to code this requirement or let me know, if i am not clear to explain my question. Thank and Regards Girish Sharma
-
Slow working of web applicationThanks for your reply and interest in the thread. I am using oracle 10G database with proper index on rol column. I cheked that oracle is returning the rows in only 1 second in sqlplus. It is returning the rows fast in the oracle; but taking lot of time to run dv=..... line. Please tell me what should i do to resolve the problem. Regards Girish Sharma
-
Slow working of web applicationHello, Using VS 2005 and ASP.NET One Update panel with following controls: sqldatasource. next and previous button to naviagate. 51 textboxes to show the data from orace table. This is select command of sqldatasource SELECT * FROM "SECM98" WHERE (("ROL" >= :ROL) AND ("ROL" <= :ROL2)) ORDER BY ROL
Public Sub showdata(ByVal r As Integer)
SqlDataSource1.EnableCaching = True
dv = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), System.Data.DataView)
TextBox1.Text = IIf(IsDBNull(dv.Table.Rows(r - 1)("rol")), "", dv.Table.Rows(r - 1)("rol"))
TextBox2.Text = IIf(IsDBNull(dv.Table.Rows(r - 1)("cen")), "", dv.Table.Rows(r - 1)("cen"))
TextBox3.Text = IIf(IsDBNull(dv.Table.Rows(r - 1)("dst")), "", dv.Table.Rows(r - 1)("dst"))
..
..
End SubIt is taking lot of time to run dv = Ctype(SqlDataSource1....) Or How do i get the resultset returned by sqldatasource, so that i can show the data in the textboxes. Please guide and help me. Regards Girish Sharma
-
Problem with codeSir, I created the required formated text file with the help of above code. Now i wish to get print on Line Matrix Printer in DOS mode; so i read that it can be achieved by run a batch file. If it is not possible with the above code then; how do i print (DOS Mode) the generated text file at client machine on the click of a button in the web page, with the help of window.print and/or by any other mean please. If you please provide me any link i shall be highly thankful to you. Best Regards Girish Sharma
-
Problem with codeAt the first stage if it runs on server machine and printer; then my question will be how to access and client's printer to get printout. Actually, this is running fine on server printer but if i remove the comment from any of last two line i.e. 'File.Delete(Server.MapPath(".") & "\" & filename) 'File.Delete(strFilePath) then no print out comes on the printer. Please help me. Regards Girish Sharma
-
Problem with codeI do'nt know, how to create the text file on client's machine; and what is another way to get the DOS mode (which runs faster) printing of a text file by asp.net, so please guide/help me in this regard. Regards Girish Sharma
-
Problem with codeSir, Thanks for your reply. From the above code, i am creating a formated text file and one batch file which will be print the formated text file by using dos mode i.e. > PRN; but sir, problem is that if i wish to delete the formated and/or batch file, after run the code, i am not able to do so. Regards Girish Sharma
-
Problem with codeHello, I am using VS 2005 and following is the code: Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim fp As StreamWriter Dim line As String Dim filename As String = System.Guid.NewGuid.ToString & ".Txt" Try fp = File.CreateText(Server.MapPath(filename)) line = "Normal Text" & Chr(27) & "E" & " Bold Text" & Chr(27) & "F" fp.WriteLine(line) line = "Normal " & Chr(27) & "S 0" & " It should be superscript" & Chr(27) & "T" fp.WriteLine(line) fp.WriteLine(Chr(27) & "4" & " Italic Mode" & Chr(27) & "5") ' Italic mode fp.WriteLine(Chr(20) & " or it should be superscript " & Chr(20) & "Normal") fp.WriteLine(Chr(15) & "Girish Kumar Sharma" & Chr(18)) ' condensed mode 'fp.WriteLine(Chr(12)) ' Page Eject fp.Close() Catch err As Exception err.ToString() Finally End Try Dim fpforbat As StreamWriter Dim strFilePath As String = "c:\\temp\\" & System.Guid.NewGuid.ToString & ".Bat" fpforbat = File.CreateText(strFilePath) Dim x As String = "Type " & Chr(34) & Server.MapPath(filename) & Chr(34) & " > PRN" fpforbat.WriteLine(x) fpforbat.Close() 'Dim strFilePath As String = "c:\\temp\\test.bat" Dim psi As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo("cmd.exe") psi.UseShellExecute = False psi.RedirectStandardOutput = True psi.RedirectStandardInput = True psi.RedirectStandardError = True psi.WorkingDirectory = "c:\\temp\\" Dim proc As System.Diagnostics.Process = System.Diagnostics.Process.Start(psi) Dim strm As System.IO.StreamReader = System.IO.File.OpenText(strFilePath) Dim sout As System.IO.StreamReader = proc.StandardOutput Dim sin As System.IO.StreamWriter = proc.StandardInput While strm.Peek() <> -1 sin.WriteLine(strm.ReadLine()) End While strm.Close() Dim stEchoFmt As String = "# {0} run successfully. Exiting" sin.WriteLine(String.Format(stEchoFmt, strFilePath)) sin.WriteLine("EXIT") proc.Close() sin.Close() sout.Close() 'File.Dele
-
Output in Dos based Text fileHello, I am using VS 2005. I have put the Crystal Report Viewer on my web page; its running fine and output are displaying in the browser. I wish to generate the dos based text file (.Txt) as per output shown in the crystal report with appropriate margins, so that i would be able to further print the text file on Wipro's Line Matrix Printer or mail the same. A simple sample example will be high appreciated please. Thanks & Regards Girish Sharma
-
Textbox value in Update panelpadmanabhan N Thank you so much for clearing doubts and nice explanation. Best Regards Girish Sharma
-
Textbox value in Update panelThanks a lot padmanabhan N. It is working fine; but it is really new to me how it is working now; when page's postback event has been fired and i have following in showdata: Public Sub showdata() dv = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), System.Data.DataView) TextBox1.Text = dv.Table.Rows(Session("r"))(1).ToString() End Sub what is the relation with the postback's true/false? I wish to thanks for providing the the answer and shall be more informative for the question i asked above please. Best Regards Girish Sharma