Click here to Skip to main content
15,921,548 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: differnce betwen Me.Close() and Me.Dispose() Pin
N a v a n e e t h23-Oct-08 22:32
N a v a n e e t h23-Oct-08 22:32 
AnswerRe: differnce betwen Me.Close() and Me.Dispose() Pin
Daniel Grunwald23-Oct-08 23:05
Daniel Grunwald23-Oct-08 23:05 
QuestionHow to Serializable OracleConnection Pin
lucdt23-Oct-08 18:07
lucdt23-Oct-08 18:07 
AnswerRe: How to Serializable OracleConnection Pin
Dave Kreskowiak24-Oct-08 1:35
mveDave Kreskowiak24-Oct-08 1:35 
GeneralRe: How to Serializable OracleConnection Pin
lucdt24-Oct-08 17:38
lucdt24-Oct-08 17:38 
AnswerRe: How to Serializable OracleConnection Pin
Wendelius24-Oct-08 7:59
mentorWendelius24-Oct-08 7:59 
GeneralRe: How to Serializable OracleConnection Pin
Anh trang24-Oct-08 17:29
Anh trang24-Oct-08 17:29 
Questionupdating database through datagrid - HELP PLEASE! Pin
libbypop23-Oct-08 17:44
libbypop23-Oct-08 17:44 
If ds.HasChanges Then
ds = New DataSet("Database")
Dim dsChanges As DataSet = ds.GetChanges()

Dim updateSQL As String = ("UPDATE CourseLearningOutcomeAssignment SET CoverageExtentID = ? WHERE LearningOutcomeID = ? AND CourseID =?")
da = New OleDbDataAdapter
Dim updateCmd As New OleDbCommand

updateCmd.Parameters.Add("CoverageExtentID", OleDbType.VarChar)
updateCmd.Parameters.Add("LearningOutcomeID", OleDbType.Integer)
updateCmd.Parameters.Add("CourseID", OleDbType.Integer)

updateCmd.Parameters("CoverageExtentID").Value = 2
updateCmd.Parameters("LearningOutcomeID").Value = 1
updateCmd.Parameters.Add("CourseID", OleDbType.Integer)


updateCmd.Parameters("CoverageExtentID").SourceColumn = "CoverageExtentID"
updateCmd.Parameters("LearningOutcomeID").SourceColumn = "LearningOutcomeID"
updateCmd.Parameters("CourseID").SourceVersion = DataRowVersion.Original

myConnection.Open()

da.Fill(ds, "viewcoursedata") <----- stops at this line of code.... with the error msg "The SelectCommand property has not been initialized before calling 'Fill"


DataGridView2.DataSource = ds.Tables("viewcoursedata")

da.Update(dsChanges, "viewcoursedata")
ds.AcceptChanges()

If updateCmd.ExecuteNonQuery() Then
MsgBox("Updated Successfully")
Else
MsgBox("Not updated Successfully")

End If
myConnection.Close()

The problem is when we try to update the datagrid with information weve entered it doesnt send it to the database, then it has an error at the line above.
Any help would be great! project due tonight! Frown | :(
AnswerRe: updating database through datagrid - HELP PLEASE! Pin
Johan Hakkesteegt24-Oct-08 0:41
Johan Hakkesteegt24-Oct-08 0:41 
QuestionData validation in a textbox Pin
saypokguy23-Oct-08 14:03
saypokguy23-Oct-08 14:03 
AnswerRe: Data validation in a textbox Pin
Rupesh Kumar Swami23-Oct-08 20:50
Rupesh Kumar Swami23-Oct-08 20:50 
AnswerRe: Data validation in a textbox Pin
Wendelius24-Oct-08 8:20
mentorWendelius24-Oct-08 8:20 
Questiontextbox Pin
kewyn23-Oct-08 8:58
kewyn23-Oct-08 8:58 
AnswerRe: textbox Pin
Dave Kreskowiak23-Oct-08 9:06
mveDave Kreskowiak23-Oct-08 9:06 
GeneralRe: textbox Pin
kewyn23-Oct-08 9:19
kewyn23-Oct-08 9:19 
GeneralRe: textbox Pin
Dave Kreskowiak23-Oct-08 10:44
mveDave Kreskowiak23-Oct-08 10:44 
GeneralRe: textbox Pin
Guffa23-Oct-08 13:58
Guffa23-Oct-08 13:58 
QuestionHow do you get the rectangular coordinates for Bookmarks in Word 2000 / 2003 ? Pin
Tomb42123-Oct-08 8:09
Tomb42123-Oct-08 8:09 
Questiontext box Pin
kewyn23-Oct-08 7:55
kewyn23-Oct-08 7:55 
AnswerRe: text box Pin
Dave Kreskowiak23-Oct-08 8:24
mveDave Kreskowiak23-Oct-08 8:24 
QuestionNeed Despriate Help with LPR printing Pin
Trey549823-Oct-08 7:47
Trey549823-Oct-08 7:47 
AnswerRe: Need Despriate Help with LPR printing Pin
Dave Kreskowiak23-Oct-08 9:03
mveDave Kreskowiak23-Oct-08 9:03 
GeneralRe: Need Despriate Help with LPR printing Pin
Trey549823-Oct-08 9:26
Trey549823-Oct-08 9:26 
QuestionInsert graphic image into PDF Pin
Cory Kimble23-Oct-08 6:34
Cory Kimble23-Oct-08 6:34 
AnswerRe: Insert graphic image into PDF Pin
Dave Kreskowiak23-Oct-08 7:37
mveDave Kreskowiak23-Oct-08 7:37 

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.