Click here to Skip to main content
15,909,440 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Can anyone help Pin
Anonymous21-Sep-05 8:34
Anonymous21-Sep-05 8:34 
QuestionLearning vb.net Pin
Member 226908017-Sep-05 5:32
Member 226908017-Sep-05 5:32 
AnswerRe: Learning vb.net Pin
Brian Van Beek17-Sep-05 18:03
Brian Van Beek17-Sep-05 18:03 
QuestionHow can i make default window text editor to my Text Editor. Pin
deepak_rai17-Sep-05 2:17
deepak_rai17-Sep-05 2:17 
AnswerRe: How can i make default window text editor to my Text Editor. Pin
Brian Van Beek17-Sep-05 18:08
Brian Van Beek17-Sep-05 18:08 
QuestionOffice Auomation Pin
mian rashed17-Sep-05 1:29
mian rashed17-Sep-05 1:29 
AnswerRe: Office Auomation Pin
seee sharp18-Sep-05 18:01
seee sharp18-Sep-05 18:01 
QuestionGranitng access to .net Pin
daviiie17-Sep-05 1:10
daviiie17-Sep-05 1:10 
I am trying to insert data into a database, but it's not working. Before I put the try...catch in I was getting a "it must be an updatable query".

So what I'm thinking is that if it isn't my code, or SQL statement. Then it must be that it doesn't have access to the database. Could someone tell me how I go about giving it access?


Here is my code, just in case its a problem with any of my code.

sConn = "Provider=Microsoft.Jet.OLEDB.4.0;"
sConn += "Data Source=C:\Inetpub\wwwroot\webapplication5\football.mdb;"

Dim sqlStr As String = "INSERT INTO Fixtures(Fixtures.HomeTeam, Fixtures.AwayTeam) Values (?,?);"

oConn = New OleDbConnection(sConn)

Try


oConn.Open()

Dim dbComm As New OleDbCommand(sqlStr, oConn)
dbComm.Parameters.Add("HomeTeam", OleDbType.VarChar, 50, "HomeTeam")
dbComm.Parameters.Add("AwayTeam", OleDbType.VarChar, 50, "AwayTeam")

dbComm.Parameters("HomeTeam").Value = HT
dbComm.Parameters("AwayTeam").Value = AT

dbComm.ExecuteNonQuery()
Catch ex As Exception

If oConn.State = ConnectionState.Open Then oConn.Close()

End Try
AnswerRe: Granitng access to .net Pin
Colin Angus Mackay17-Sep-05 2:01
Colin Angus Mackay17-Sep-05 2:01 
AnswerRe: Granitng access to .net Pin
KaptinKrunch18-Sep-05 17:51
KaptinKrunch18-Sep-05 17:51 
QuestionRun time error - CR10-VB.NET Pin
Ranoush16-Sep-05 23:59
Ranoush16-Sep-05 23:59 
Question3rd Party Controls Pin
Gopi.V16-Sep-05 23:32
Gopi.V16-Sep-05 23:32 
AnswerRe: 3rd Party Controls Pin
Dave Kreskowiak17-Sep-05 3:56
mveDave Kreskowiak17-Sep-05 3:56 
QuestionRe: 3rd Party Controls Pin
Gopi.V18-Sep-05 18:18
Gopi.V18-Sep-05 18:18 
AnswerRe: 3rd Party Controls Pin
seee sharp18-Sep-05 18:03
seee sharp18-Sep-05 18:03 
QuestionHandling Exceptions Pin
nitin_ion16-Sep-05 21:17
nitin_ion16-Sep-05 21:17 
AnswerRe: Handling Exceptions Pin
Colin Angus Mackay17-Sep-05 2:04
Colin Angus Mackay17-Sep-05 2:04 
GeneralRe: Handling Exceptions Pin
nitin_ion17-Sep-05 23:51
nitin_ion17-Sep-05 23:51 
GeneralRe: Handling Exceptions Pin
Colin Angus Mackay18-Sep-05 0:15
Colin Angus Mackay18-Sep-05 0:15 
GeneralRe: Handling Exceptions Pin
nitin_ion18-Sep-05 0:24
nitin_ion18-Sep-05 0:24 
GeneralRe: Handling Exceptions Pin
nitin_ion18-Sep-05 2:28
nitin_ion18-Sep-05 2:28 
QuestionVB.NET & Win32 API Pin
hung_ngole16-Sep-05 17:48
hung_ngole16-Sep-05 17:48 
QuestionScrolling Programmatically Pin
Gulfraz Khan16-Sep-05 7:39
Gulfraz Khan16-Sep-05 7:39 
AnswerRe: Scrolling Programmatically Pin
seee sharp18-Sep-05 18:05
seee sharp18-Sep-05 18:05 
GeneralRe: Scrolling Programmatically Pin
Gulfraz Khan19-Sep-05 5:09
Gulfraz Khan19-Sep-05 5:09 

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.