Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. system.io

system.io

Scheduled Pinned Locked Moved ASP.NET
helpcsharpdatabase
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    didi24
    wrote on last edited by
    #1

    hi...i got some problems with my project...on streamreader.. heres the problem that i'm facing.I couldnt split the string from a textfile,each to be shown in different text box. the sample string in textfile/txt:010120040910094100006666 And i want ot split it to 0101,20040910,0941,00006666 each of them into diff textbox...or list box coz i have a lot of it... i cant seem to use the vb.net codings 4 it...soo...can u help me on tis here's a sample of my old vb.net project coding: Dim strproduct() As String Dim strprice() As String Dim strquantity() As String Dim strFileName As String Dim strsplit() As String Dim datContent As StreamReader Const delimit = "," strFileName = OpenFileDialog1.FileName strFileName = OpenFileDialog1.FileName datContent = New StreamReader(strFileName) While (strFileName <> Nothing) ReDim Preserve strproduct(count) ReDim Preserve strprice(count) ReDim Preserve strquantity(count) strsplit = Split(strFileName, delimit) strproduct(count) = strsplit(0) strprice(count) = strsplit(1) strquantity(count) = strsplit(2) count += 1 strFileName = datContent.ReadLine() the thing is...i do not have any delimiter to split each of them.and after i split each of them..i want to transfer them into a database. please help me with this thanks for reading it...:) *'didi'*

    B 1 Reply Last reply
    0
    • D didi24

      hi...i got some problems with my project...on streamreader.. heres the problem that i'm facing.I couldnt split the string from a textfile,each to be shown in different text box. the sample string in textfile/txt:010120040910094100006666 And i want ot split it to 0101,20040910,0941,00006666 each of them into diff textbox...or list box coz i have a lot of it... i cant seem to use the vb.net codings 4 it...soo...can u help me on tis here's a sample of my old vb.net project coding: Dim strproduct() As String Dim strprice() As String Dim strquantity() As String Dim strFileName As String Dim strsplit() As String Dim datContent As StreamReader Const delimit = "," strFileName = OpenFileDialog1.FileName strFileName = OpenFileDialog1.FileName datContent = New StreamReader(strFileName) While (strFileName <> Nothing) ReDim Preserve strproduct(count) ReDim Preserve strprice(count) ReDim Preserve strquantity(count) strsplit = Split(strFileName, delimit) strproduct(count) = strsplit(0) strprice(count) = strsplit(1) strquantity(count) = strsplit(2) count += 1 strFileName = datContent.ReadLine() the thing is...i do not have any delimiter to split each of them.and after i split each of them..i want to transfer them into a database. please help me with this thanks for reading it...:) *'didi'*

      B Offline
      B Offline
      Bill Dean
      wrote on last edited by
      #2

      Didi, Forget code for a second...tell us in words how to decide where to split the text string into pieces. Is it always 4 characters, then 8 then 4, then 8? Bill

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups