Click here to Skip to main content
16,005,316 members
Home / Discussions / Database
   

Database

 
GeneralRe: Dataset Pin
Christian Graus7-Jul-05 18:56
protectorChristian Graus7-Jul-05 18:56 
Generalsql 2005 installation Pin
Anonymous7-Jul-05 17:02
Anonymous7-Jul-05 17:02 
GeneralPrinting Reports Pin
OMalleyW7-Jul-05 8:00
OMalleyW7-Jul-05 8:00 
Generalmysql table problem Pin
jetset327-Jul-05 6:57
jetset327-Jul-05 6:57 
GeneralRestore Database Pin
abo el ror7-Jul-05 4:24
abo el ror7-Jul-05 4:24 
GeneralRe: Restore Database Pin
Michael Potter7-Jul-05 9:21
Michael Potter7-Jul-05 9:21 
GeneralRe: Restore Database Pin
Anonymous7-Jul-05 20:36
Anonymous7-Jul-05 20:36 
GeneralProblem inserting record in Access database Pin
shapper7-Jul-05 1:54
shapper7-Jul-05 1:54 
Hello,

I am trying to insert a record in an Access database using Asp.Net/Vb.Net.

I am getting the error: "Operation must use an updateable query."

How can I solve this problem?

The code I am using is:

' Set Connection
Dim connectionString As String = AppSettings("connectionString")
Dim dbConnection As IDbConnection = New OleDbConnection(connectionString)

' Set Query
Dim queryString As String = "INSERT INTO [t_news] ([title_pt-PT], [title_en-GB], [text_pt-PT], [text_en-GB], [publication_date]) VALUES (@title_ptPT, @title_enGB, @text_ptPT, @text_enGB, @publication_date)"

' Set Command
Dim dbCommand As IDbCommand = New OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

' Add Parameters
With dbCommand.Parameters
.Add(New OleDbParameter("@title_ptPT", "title PT"))
.Add(New OleDbParameter("@title_enGB", "title GB"))
.Add(New OleDbParameter("@text_ptPT", "text PT"))
.Add(New OleDbParameter("@text_enGB", "text GB"))
.Add(New OleDbParameter("@publication_date", DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss")))
End With

' Insert New Record
dbConnection.Open()
Try
dbCommand.ExecuteNonQuery()
Finally
dbConnection.Close()
End Try


Thank You,
Miguel

GeneralImporting the data from xls to SQL server table through asp.net Pin
7-Jul-05 1:31
suss7-Jul-05 1:31 
GeneralMonitoring Sql Server2000............... Pin
under28117-Jul-05 1:30
under28117-Jul-05 1:30 
GeneralRe: Monitoring Sql Server2000............... Pin
under28118-Jul-05 1:54
under28118-Jul-05 1:54 
QuestionHow to change Date Format in SQL Server 2000 Pin
imshally817-Jul-05 0:45
imshally817-Jul-05 0:45 
AnswerRe: How to change Date Format in SQL Server 2000 Pin
jonathan157-Jul-05 1:55
jonathan157-Jul-05 1:55 
AnswerRe: How to change Date Format in SQL Server 2000 Pin
Rob Graham7-Jul-05 10:31
Rob Graham7-Jul-05 10:31 
GeneralUpdate More than one Table using ADO in Visual C++ 6.0 under one application Pin
Wisdom20046-Jul-05 22:35
Wisdom20046-Jul-05 22:35 
GeneralInvoking Java API from SQL Stored Procedure Pin
Member 20071356-Jul-05 19:27
Member 20071356-Jul-05 19:27 
GeneralRe: Invoking Java API from SQL Stored Procedure Pin
Rob Graham8-Jul-05 17:39
Rob Graham8-Jul-05 17:39 
GeneralSYNCRONISE MYSQL WITH SQL SERVER Pin
RajithCAlwis6-Jul-05 0:47
RajithCAlwis6-Jul-05 0:47 
Generalstoresql date time related Pin
Member 4472176-Jul-05 0:29
Member 4472176-Jul-05 0:29 
GeneralRe: storesql date time related Pin
Colin Angus Mackay6-Jul-05 0:48
Colin Angus Mackay6-Jul-05 0:48 
Generaldisbaling identity Pin
sianatia5-Jul-05 19:41
sianatia5-Jul-05 19:41 
GeneralRe: disbaling identity Pin
Rob Graham7-Jul-05 12:56
Rob Graham7-Jul-05 12:56 
GeneralRe: Crystal Report can not show data Pin
RajithCAlwis6-Jul-05 0:34
RajithCAlwis6-Jul-05 0:34 
GeneralRe: Crystal Report can not show data Pin
rajith20056-Jul-05 3:20
rajith20056-Jul-05 3:20 
GeneralHelp : i can't open a connection Pin
SmartSDR5-Jul-05 7:37
SmartSDR5-Jul-05 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.