Click here to Skip to main content
15,896,398 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Run .Net 4.0 WPF App on WinXP SP3 Pin
Pete O'Hanlon13-May-14 9:38
mvePete O'Hanlon13-May-14 9:38 
GeneralRe: Run .Net 4.0 WPF App on WinXP SP3 Pin
Kevin Marois13-May-14 9:43
professionalKevin Marois13-May-14 9:43 
GeneralRe: Run .Net 4.0 WPF App on WinXP SP3 Pin
Pete O'Hanlon13-May-14 10:07
mvePete O'Hanlon13-May-14 10:07 
GeneralRe: Run .Net 4.0 WPF App on WinXP SP3 Pin
Bernhard Hiller13-May-14 20:42
Bernhard Hiller13-May-14 20:42 
Questiondatalist problem Pin
suhas mewada9-May-14 23:14
suhas mewada9-May-14 23:14 
AnswerRe: datalist problem Pin
Richard MacCutchan11-May-14 2:45
mveRichard MacCutchan11-May-14 2:45 
AnswerRe: datalist problem Pin
sankarsan parida11-May-14 23:25
professionalsankarsan parida11-May-14 23:25 
QuestionCan't add data to a dataset based on an Access query with an AutoNumber Primary Key Pin
Peter R. Fletcher7-May-14 13:15
Peter R. Fletcher7-May-14 13:15 
I am writing in VB.NET, enhancing a working program. Part of the program involves getting data from various outside sources and saving it in tables in an Access database. I am adding a new outside source (for the first time for quite a while), and am tearing my hair out trying to get code that is working with previously created DataTables and their derivatives to work with a newly created set.

I used the dataset configuration facility to create a DataTable based on a Query from my new Access table. The Access query returns all the fields of recent records in the Table and is updateable in Access. The dataset query is
SELECT PriKey, ChannelNumber, ChannelName, ReadingDate, Power FROM  qryRecentSpyderData

PriKey is an AutoNumber primary key. Other than different field names, I have an apparently identical setup working without problems in another function. The failing code is:
VB
        Dim dst1 As New EnergyDataSet
        Dim tba1 As New EnergyDataSetTableAdapters.SpyderMinTableAdapter
        Dim tbl1 As New EnergyDataSet.SpyderMinDataDataTable
        Dim rowData() As EnergyDataSet.SpyderMinDataRow
        Dim rowNew As EnergyDataSet.SpyderMinDataRow
...
        For intCount = intStart To 0 Step -1
            rowNew = tbl1.NewSpyderMinDataRow
            rowNew.ChannelNumber = intChannel
            rowNew.ChannelName = minhArray(intCount).strChannel
            rowNew.ReadingDate = minhArray(intCount).dtSampleTime
            rowNew.Power = minhArray(intCount).sngPower
            tbl1.Rows.Add(rowNew)
        Next


The Rows.Add line throws a "Nulls not allowed" exception the first time through the loop. If I relax constraints, it throws a "Duplicate Primary Key" exception the second time through. I know that I haven't set the Primary Key - Access will set it in due course! I cannot see why this fails, while essentially identical code using what appears to be an exactly comparable dataset succeeds. What am I missing?
AnswerRe: Can't add data to a dataset based on an Access query with an AutoNumber Primary Key Pin
Peter R. Fletcher7-May-14 15:30
Peter R. Fletcher7-May-14 15:30 
QuestionTrying to create a custom ValidationAttribute Pin
dmikester107-May-14 9:49
dmikester107-May-14 9:49 
Question.NET solution for Accouting Pin
gurusarma5-May-14 19:57
gurusarma5-May-14 19:57 
GeneralRe: .NET solution for Accouting Pin
Richard MacCutchan5-May-14 20:15
mveRichard MacCutchan5-May-14 20:15 
Question"data is updated successfuly..." is shown but database cannot updated Pin
dipesh_karmakar4-May-14 6:01
dipesh_karmakar4-May-14 6:01 
AnswerRe: "data is updated successfuly..." is shown but database cannot updated Pin
Eddy Vluggen4-May-14 8:40
professionalEddy Vluggen4-May-14 8:40 
SuggestionRe: "data is updated successfuly..." is shown but database cannot updated Pin
saroj mnaik11-May-14 9:06
saroj mnaik11-May-14 9:06 
AnswerRe: "data is updated successfuly..." is shown but database cannot updated Pin
saroj mnaik11-May-14 9:12
saroj mnaik11-May-14 9:12 
Questionhow to join all three query results to one in mysql Pin
sr1591-May-14 5:55
sr1591-May-14 5:55 
SuggestionRe: how to join all three query results to one in mysql Pin
Richard Deeming1-May-14 6:50
mveRichard Deeming1-May-14 6:50 
QuestionRunning .NET 4.0 Targeted app in .NET 3.5 ONLY environment Pin
TheGreatAndPowerfulOz30-Apr-14 8:57
TheGreatAndPowerfulOz30-Apr-14 8:57 
SuggestionRe: Running .NET 4.0 Targeted app in .NET 3.5 ONLY environment Pin
Matt T Heffron30-Apr-14 10:04
professionalMatt T Heffron30-Apr-14 10:04 
GeneralRe: Running .NET 4.0 Targeted app in .NET 3.5 ONLY environment Pin
TheGreatAndPowerfulOz30-Apr-14 10:13
TheGreatAndPowerfulOz30-Apr-14 10:13 
AnswerRe: Running .NET 4.0 Targeted app in .NET 3.5 ONLY environment Pin
Gerry Schmitz30-Apr-14 10:10
mveGerry Schmitz30-Apr-14 10:10 
GeneralRe: Running .NET 4.0 Targeted app in .NET 3.5 ONLY environment Pin
TheGreatAndPowerfulOz30-Apr-14 10:14
TheGreatAndPowerfulOz30-Apr-14 10:14 
QuestionDevoloping a Calc spreadsheet program using C# Pin
sifi mohamed amine25-Apr-14 3:50
sifi mohamed amine25-Apr-14 3:50 
AnswerRe: Devoloping a Calc spreadsheet program using C# Pin
José Amílcar Casimiro3-May-14 7:38
José Amílcar Casimiro3-May-14 7:38 

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.