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. asp.net 2.0 vb.net Index Server

asp.net 2.0 vb.net Index Server

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasesysadmin
2 Posts 1 Posters 0 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.
  • M Offline
    M Offline
    Michael Clinton
    wrote on last edited by
    #1

    I am working on a job posting web site and I am using the index server to be able to search thru individual jobs that get ftp up. The problem is how do I truncate the data or extract the data out of the characterization. Here is an example of the contents of my characterization. 15010, CEV Demo Chief Engineer - Space . Category: Engineering. Region: CA-Los Angeles/Orange Counties. City: El Segundo. State: CA. Rate: $60.00 - $65.00. Duration: 6 - 12 Months. Description: Technical Integrity, CEV, Spacecraft Systems~. RESPONSIBILIITES:. Responsible to the CEV Demo IPT Leader and Program I need to bind to a gridview to the first line... that would only be the job number. Then I want the rest for the next column to have the job title. After that, the description is my keywords for my next column and then a combo of State and City in one column and the final column to have the Rate. I thought I could use substrings and pathindex to get the individual data out, but that didn't work. thanks mjc

    M 1 Reply Last reply
    0
    • M Michael Clinton

      I am working on a job posting web site and I am using the index server to be able to search thru individual jobs that get ftp up. The problem is how do I truncate the data or extract the data out of the characterization. Here is an example of the contents of my characterization. 15010, CEV Demo Chief Engineer - Space . Category: Engineering. Region: CA-Los Angeles/Orange Counties. City: El Segundo. State: CA. Rate: $60.00 - $65.00. Duration: 6 - 12 Months. Description: Technical Integrity, CEV, Spacecraft Systems~. RESPONSIBILIITES:. Responsible to the CEV Demo IPT Leader and Program I need to bind to a gridview to the first line... that would only be the job number. Then I want the rest for the next column to have the job title. After that, the description is my keywords for my next column and then a combo of State and City in one column and the final column to have the Rate. I thought I could use substrings and pathindex to get the individual data out, but that didn't work. thanks mjc

      M Offline
      M Offline
      Michael Clinton
      wrote on last edited by
      #2

      Ok, I got it to work. What I did was saved query result into a dataset and then using string functions to get my data out and then create a datatable and added each row with data from the dataset. Dim accessConnection As OleDbConnection = New OleDbConnection("Provider=MSIDXS") Dim accessCommand As New OleDbCommand(query, accessConnection) Dim newjobsDataAdapter As New OleDbDataAdapter(accessCommand) Dim myDataSet As New DataSet() Dim newjobsDataTable As New DataTable("newjobs") newjobsDataAdapter.Fill(myDataSet, "newjobs") Dim dataTableRowCount As Integer = newjobsDataTable.Rows.Count Dim myDataTable As DataTable = myDataSet.Tables(0) Dim tempdata As String Dim spc1 As Integer Dim spc2 As Integer Dim spc3 As Integer Dim spc4 As Integer myDataTable.Columns.Add(New DataColumn("ID", GetType(Integer))) myDataTable.Columns.Add(New DataColumn("JobID", GetType(Integer))) myDataTable.Columns.Add(New DataColumn("JobTitle", GetType(String))) myDataTable.Columns.Add(New DataColumn("Keywords", GetType(String))) myDataTable.Columns.Add(New DataColumn("Location", GetType(String))) myDataTable.Columns.Add(New DataColumn("Rate", GetType(String))) For i = 0 To myDataTable.Rows.Count - 1 myDataTable.Rows(i)("ID") = i + 1 tempdata = myDataTable.Rows(i)("characterization") spc1 = InStr(myDataTable.Rows(i)("characterization"), ",") spc2 = InStr(myDataTable.Rows(i)("characterization"), ". Category") myDataTable.Rows(i)("JobID") = Convert.ToInt32(Mid(tempdata, 1, spc1 - 1)) myDataTable.Rows(i)("JobTitle") = LTrim(Mid(tempdata, spc1 + 2, spc2 - 8)) spc1 = InStr(myDataTable.Rows(i)("characterization"), "Description") spc2 = InStr(spc1, myDataTable.Rows(i)("characterization"), "~.") myDataTable.Rows(i)("Keywords") = LTrim(Mid(tempdata, spc1 + 13, spc2 - spc1 - 12)) spc1 = InStr(myDataTable.Rows(i)("characterization"), "State") spc2 = InStr(spc1, myDataTable.Rows(i)("characterization"), ".") spc3 = InStr(myDataTable.Rows(i)("characterization"), "City") spc4 = InStr(spc3, myDataTable.Rows(i)("characterization"), ".") myDataTable.Rows(i)("Location")

      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