Click here to Skip to main content
   

C#

 
AnswerRe: sqlQuery PinmvpOriginalGriff6-Oct-12 5:49 
Questiontic toe game not working as expected,please help? PinmemberMember 94790245-Oct-12 23:59 
AnswerRe: tic toe game not working as expected,please help? PinprotectorPete O'Hanlon6-Oct-12 2:51 
AnswerRe: tic toe game not working as expected,please help? PinmemberJohn Orendt7-Oct-12 1:36 
QuestionHow to create a message sender which will use your mobile no and credit but no use of your mobile? Pinmemberzain_zone5-Oct-12 23:11 
AnswerRe: How to create a message sender which will use your mobile no and credit but no use of your mobile? PinmemberEddy Vluggen6-Oct-12 4:45 
GeneralRe: How to create a message sender which will use your mobile no and credit but no use of your mobile? PinmvpOriginalGriff6-Oct-12 6:00 
QuestionNeed Help UNICODE PinmemberNazim Iqbal5-Oct-12 14:55 
Hi
 

I need your help in,
I am working on a project, MYSQL and PHP based, with WAMP SERVER
I have a field storytext, (data collected in URDU) detail are:
 
<b>Field               Type         Collation                    Null        Default
storytext          text           utf8_unicode_ci            Yes        NULL</b>
 
Retrieving URDU Data from MY SQL 5.5.8 running on wamp server with PHP is OK,
 
And the soft ware is only for Internal use not web base!
------------------------------------------------------------------------------------------
<b>HERE IS THE PROBLEM:</b>
 
One section of it is designed on Visual Studio.NET 2010 in which
 
I have a datagrid, on clicking any row I got the TEXT in details on text box,
 
which show <b>URDU TEXT</b>, from data base here is the problem with <b>TEXT BOX and DATAGRID.</b>
 
I got this..........
 
<b>DESP. ITEM
 
پروگرام رانا مب
شر ايٹ پرائم ٹائم ميں
گ٠تگو کرتے Û ÙˆØ¦Û’ وزير٠اعظم Ú©Û’
وکيل Ú†ÙˆÛ Ø¯Ø±ÙŠ اعتزاز احسن
کا Ú©Û Ù†Ø§ تھا Ú©Û ØµØ¯Ø± Ú©Û’ Ø¹Û Ø¯Û’
Ú©Ùˆ استشني حاصل Û Û’
وزير٠اعظم Ø</b>
-------------------------------------------------------------------------------------------------------
I also use in visual studio
 
<b>cnString = "datasource=localhost;username=root;password=;database=spidernews;charset=utf8;"</b>
 
How can I solve this problem,
can you help me out !
<b>URDU NOT SHOWING,  </b>
 
<pre lang="vb">Here is Whole CODE of Visual Studio, I am using:
------------------------------------------------------------------------------------------------------------------------</pre>
 

<pre lang="text">
Imports MySql.Data.MySqlClient
 
Public Class Form1
 
    Dim conn As Common.DbConnection
    Dim da As Common.DbDataAdapter
    Dim ds As DataSet = New DataSet
    Dim cnString As String
    Dim sqlQRY As String
    'Dim dt As DataTable
    'Dim strBuilder As Char
 

 

    '''' SCROLLONG TEXT START
    Dim scrollingText As String = "Spider NEWS "
    Dim txtStr(scrollingText.Length - 1) As String
    Dim txtPos As Integer = -1
 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
        'strBuilder.ToString ("tblnews" & char(34))
 

        cnString = "datasource=localhost;username=root;password=;database=spidernews;charset=utf8;"
 
        sqlQRY = "SET NAMES UTF8; SET CHARACTER SET UTF8;Select slugid,slug,storytext,storyduration,segmentdescription,prioritydescription,mosstatus from tblnews"
        'sqlQRY = "SET NAMES UTF8; SET CHARACTER SET latin1;Select slugid,slug,storytext,storyduration,segmentdescription,prioritydescription,mosstatus from tblnews"
        conn = New MySqlConnection(cnString)
 
        Try
            conn.Open()
            da = New MySqlDataAdapter(sqlQRY, conn)
            Dim cb As MySqlCommandBuilder = New MySqlCommandBuilder(da)
 
            da.Fill(ds, "tblnews")
 
            DataGridView1.DataSource = ds
            DataGridView1.DataMember = "tblnews"
            '''''
 

        Catch ex As Common.DbException
            MsgBox(ex.ToString)
        Finally
            conn.Close()
        End Try
 
        '''' SCROLLONG TEXT START
        For idx As Integer = 0 To UBound(txtStr)
            Dim workedString As String = ""
            workedString = scrollingText.Substring(idx) & " " & scrollingText.Substring(0, idx)
            txtStr(idx) = workedString
        Next
        Timer1.Interval = 5000
        Timer1.Enabled = True
        Timer1.Start()
        '''' SCROLLONG TEXT END
        Label2.Text = System.DateTime.Now
 
    End Sub
 
    Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
 
        da.Update(ds, "" + TextBox1.Text + "")
        MsgBox("Data sent", MsgBoxStyle.OkOnly, "Sucess")
 
    End Sub
 
    Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
 
        Dim i, j As Integer
        i = DataGridView1.CurrentRow.Index
        RichTextBox1.Text = DataGridView1.Item(2, i).Value
 
    End Sub
 
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
 
        Dim i, j As Integer
        i = DataGridView1.CurrentRow.Index
 
        '''' SCROLLONG TEXT START
        txtPos += 1
        Dim timerStr As String
        timerStr = txtStr(txtPos)
        RichTextBox1.Text = DataGridView1.Item(2, i).Value
 
        Label1.Text = timerStr
        If txtPos = UBound(txtStr) Then txtPos = -1
        '''' SCROLLONG TEXT START
 
    End Sub
 
End Class
 

 
</pre>

AnswerRe: Need Help UNICODE PinmvpRichard MacCutchan5-Oct-12 23:29 
QuestionC# search directory paths Pinmemberrachel_m5-Oct-12 11:43 
AnswerRe: C# search directory paths PinmemberEddy Vluggen5-Oct-12 11:49 
AnswerRe: C# search directory paths PinmvpRichard MacCutchan5-Oct-12 23:28 
GeneralRe: C# search directory paths Pinmemberrachel_m6-Oct-12 10:01 
GeneralRe: C# search directory paths PinmvpRichard MacCutchan6-Oct-12 22:19 
Generalpls help learn c# need someone to guide me thru Pinmemberbecky suinner5-Oct-12 10:42 
GeneralRe: pls help learn c# need someone to guide me thru PinmemberEddy Vluggen5-Oct-12 10:46 
GeneralRe: pls help learn c# need someone to guide me thru Pinmemberbecky suinner5-Oct-12 10:58 
GeneralRe: pls help learn c# need someone to guide me thru PinmemberEddy Vluggen5-Oct-12 11:03 
GeneralRe: pls help learn c# need someone to guide me thru Pinmemberbecky suinner5-Oct-12 11:01 
GeneralRe: pls help learn c# need someone to guide me thru PinmemberEddy Vluggen5-Oct-12 11:08 
GeneralRe: pls help learn c# need someone to guide me thru PinmvpRichard MacCutchan5-Oct-12 23:19 
GeneralRe: pls help learn c# need someone to guide me thru PinprotectorPete O'Hanlon5-Oct-12 23:28 
Questionhow can i delete data from sql database on select the item from listbox in window form in asp.net PinmemberRanjeet69315-Oct-12 8:23 
AnswerRe: how can i delete data from sql database on select the item from listbox in window form in asp.net Pinmemberkamalkss5-Oct-12 9:00 
GeneralRe: how can i delete data from sql database on select the item from listbox in window form in asp.net PinmemberRanjeet69315-Oct-12 9:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150224.1 | Last Updated 27 Feb 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid