Click here to Skip to main content
15,566,615 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Object reference not set to an instance of an object Pin
Christian Graus11-Jul-07 16:50
mveChristian Graus11-Jul-07 16:50 
GeneralRe: Object reference not set to an instance of an object Pin
Rhys Gravell11-Jul-07 21:21
professionalRhys Gravell11-Jul-07 21:21 
AnswerRe: Object reference not set to an instance of an object Pin
Pete O'Hanlon12-Jul-07 3:18
mvaPete O'Hanlon12-Jul-07 3:18 
Questiongridview slow Pin
VickyC#11-Jul-07 15:48
VickyC#11-Jul-07 15:48 
AnswerRe: gridview slow Pin
Christian Graus11-Jul-07 15:55
mveChristian Graus11-Jul-07 15:55 
GeneralRe: gridview slow Pin
VickyC#12-Jul-07 4:28
VickyC#12-Jul-07 4:28 
Questionasp.net 2.0 vb.net Index Server Pin
Michael Clinton11-Jul-07 13:44
Michael Clinton11-Jul-07 13:44 
AnswerRe: asp.net 2.0 vb.net Index Server Pin
Michael Clinton13-Jul-07 13:35
Michael Clinton13-Jul-07 13:35 
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") = LTrim(Mid(tempdata, spc1 + 7, spc2 - spc1 - 7)) + ", " + LTrim(Mid(tempdata, spc3 + 6, spc4 - spc3 - 6))
spc1 = InStr(myDataTable.Rows(i)("characterization"), "Rate")
spc2 = InStr(spc1, myDataTable.Rows(i)("characterization"), ".")
myDataTable.Rows(i)("Rate") = LTrim(Mid(tempdata, spc1 + 6, spc2 - spc1 - 6))
Next

Dim myDataView As DataView = myDataTable.DefaultView

If myDataTable.Rows.Count > 0 Then
GridView1.DataSource = myDataView
GridView1.DataBind()
End If

Hope this helps other people.
QuestionCalender Pop Up and master Page Problem Pin
kidus111-Jul-07 12:33
kidus111-Jul-07 12:33 
AnswerRe: Calender Pop Up and master Page Problem Pin
kjosh11-Jul-07 12:46
kjosh11-Jul-07 12:46 
GeneralRe: Calender Pop Up and master Page Problem Pin
kidus111-Jul-07 12:52
kidus111-Jul-07 12:52 
GeneralRe: Calender Pop Up and master Page Problem Pin
kidus111-Jul-07 12:53
kidus111-Jul-07 12:53 
GeneralRe: Calender Pop Up and master Page Problem Pin
kjosh11-Jul-07 13:10
kjosh11-Jul-07 13:10 
GeneralRe: Calender Pop Up and master Page Problem Pin
kidus112-Jul-07 3:11
kidus112-Jul-07 3:11 
GeneralRe: Calender Pop Up and master Page Problem Pin
Member 186252323-Aug-08 23:55
Member 186252323-Aug-08 23:55 
QuestionMapping database fileds Pin
patelash0111-Jul-07 11:21
patelash0111-Jul-07 11:21 
AnswerRe: Mapping database fileds Pin
Paul Conrad13-Jul-07 13:19
professionalPaul Conrad13-Jul-07 13:19 
Questionhash and salt Pin
boyindie11-Jul-07 9:58
boyindie11-Jul-07 9:58 
AnswerBAD USER! Pin
leckey11-Jul-07 10:16
leckey11-Jul-07 10:16 
AnswerRe: hash and salt Pin
Dave Kreskowiak11-Jul-07 10:28
mveDave Kreskowiak11-Jul-07 10:28 
GeneralRe: hash and salt Pin
boyindie11-Jul-07 23:38
boyindie11-Jul-07 23:38 
GeneralRe: hash and salt Pin
Dave Kreskowiak12-Jul-07 2:41
mveDave Kreskowiak12-Jul-07 2:41 
AnswerRe: hash and salt Pin
Pete O'Hanlon11-Jul-07 11:27
mvaPete O'Hanlon11-Jul-07 11:27 
GeneralRe: hash and salt Pin
leckey11-Jul-07 16:00
leckey11-Jul-07 16:00 
GeneralRe: hash and salt Pin
Sathesh Sakthivel11-Jul-07 18:58
Sathesh Sakthivel11-Jul-07 18:58 

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

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