Click here to Skip to main content
15,908,013 members
Home / Discussions / Database
   

Database

 
QuestionDatabase Connectivity Problem Pin
Member 1190668913-Aug-15 1:20
Member 1190668913-Aug-15 1:20 
AnswerRe: Database Connectivity Problem Pin
Mycroft Holmes13-Aug-15 16:20
professionalMycroft Holmes13-Aug-15 16:20 
AnswerRe: Database Connectivity Problem Pin
Corporal Agarn14-Aug-15 0:40
professionalCorporal Agarn14-Aug-15 0:40 
QuestionUsing SQLite in C++ and C# Pin
Kevin Marois7-Aug-15 12:47
professionalKevin Marois7-Aug-15 12:47 
AnswerRe: Using SQLite in C++ and C# Pin
PIEBALDconsult7-Aug-15 14:04
mvePIEBALDconsult7-Aug-15 14:04 
QuestionSQL Transacation questions Pin
Tunisiano326-Aug-15 1:57
Tunisiano326-Aug-15 1:57 
AnswerRe: SQL Transacation questions Pin
Eddy Vluggen16-Aug-15 1:17
professionalEddy Vluggen16-Aug-15 1:17 
GeneralRe: SQL Transacation questions Pin
chairborne8217-Aug-15 17:12
chairborne8217-Aug-15 17:12 
QuestionSQL Linq, Row Number() Over, equiv in VB Pin
jkirkerx4-Aug-15 14:03
professionaljkirkerx4-Aug-15 14:03 
AnswerRe: SQL Linq, Row Number() Over, equiv in VB Pin
Richard Deeming5-Aug-15 1:41
mveRichard Deeming5-Aug-15 1:41 
GeneralRe: SQL Linq, Row Number() Over, equiv in VB Pin
jkirkerx5-Aug-15 6:09
professionaljkirkerx5-Aug-15 6:09 
GeneralRe: SQL Linq, Row Number() Over, equiv in VB Pin
jkirkerx5-Aug-15 7:58
professionaljkirkerx5-Aug-15 7:58 
GeneralRe: SQL Linq, Row Number() Over, equiv in VB Pin
Richard Deeming5-Aug-15 8:12
mveRichard Deeming5-Aug-15 8:12 
GeneralRe: SQL Linq, Row Number() Over, equiv in VB Pin
Richard Deeming5-Aug-15 8:18
mveRichard Deeming5-Aug-15 8:18 
GeneralRe: SQL Linq, Row Number() Over, equiv in VB Pin
jkirkerx5-Aug-15 10:39
professionaljkirkerx5-Aug-15 10:39 
QuestionIs this possible, using an old foxpro database files and oledb for DBase Pin
jkirkerx30-Jul-15 13:18
professionaljkirkerx30-Jul-15 13:18 
AnswerRe: Is this possible, using an old foxpro database files and oledb for DBase Pin
Mycroft Holmes30-Jul-15 14:13
professionalMycroft Holmes30-Jul-15 14:13 
GeneralRe: Is this possible, using an old foxpro database files and oledb for DBase Pin
jkirkerx31-Jul-15 6:25
professionaljkirkerx31-Jul-15 6:25 
Questionrestore database Pin
millerwilliam3529-Jul-15 2:51
millerwilliam3529-Jul-15 2:51 
AnswerRe: restore database Pin
CHill6029-Jul-15 3:56
mveCHill6029-Jul-15 3:56 
QuestionRe: restore database Pin
Eddy Vluggen29-Jul-15 5:31
professionalEddy Vluggen29-Jul-15 5:31 
AnswerRe: restore database Pin
Mycroft Holmes29-Jul-15 14:30
professionalMycroft Holmes29-Jul-15 14:30 
AnswerRe: restore database Pin
Nitzan Levi22-Aug-15 20:20
Nitzan Levi22-Aug-15 20:20 
QuestionUpdate SQL Server Table with a Spreadsheet Worksheet DataTable using CommandBuilder Pin
LHendren27-Jul-15 1:37
LHendren27-Jul-15 1:37 
I have created a DataTable from a spreadsheet worksheet and want to UPDATE my SQL table, but am struggling. I cannot update the single table having a Primary Key with the changed column information. Should be easy and straight forward. The ShowResult(dataTable) depicts the correct DataTable information. (Using some DevExpress expressions)

' Create a data table with column names obtained from the first row in a range if it has headers.
' Column data types are obtained from cell value types of cells in the first data row of the worksheet range.

Dim dtpHExportDataTable As DataTable = worksheet.CreateDataTable(range, rangeHasHeaders)

' Create the exporter that obtains data from the specified range, ' 'skips header row if required and populates the specified data ' table.

Dim exporter As DataTableExporter = worksheet.CreateDataTableExporter(range,dtpHExportDataTable, rangeHasHeaders)

AddHandler exporter.CellValueConversionError, AddressOf exporter_CellValueConversionError

' Specify exporter options.

exporter.Options.ConvertEmptyCells = True
exporter.Options.DefaultCellValueToColumnTypeConverter.EmptyCellValue = 0

'Perform the export.
exporter.Export()

'A custom method that displays the resulting data table.
ShowResult(dtpHExportDataTable) 'Looks good!

'Now, my code to Update the "Result" column in my sql table with the datatable information

Dim cnSQL As SqlConnection = dbLIMS.GetLIMSConnection

Using adapter = New SqlDataAdapter("SELECT * FROM Analytical_Sample_Log_ResultsInfo", cnSQL)
Using New SqlCommandBuilder(adapter)
adapter.Fill(dtpHExportDataTable)
cnSQL.Open()
adapter.Update(dtpHExportDataTable)
End Using
End Using
AnswerRe: Update SQL Server Table with a Spreadsheet Worksheet DataTable using CommandBuilder Pin
Mycroft Holmes27-Jul-15 14:33
professionalMycroft Holmes27-Jul-15 14:33 

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.