Click here to Skip to main content
14,243,622 members
   

Database

 
AnswerRe: is it safe to use this with sql server and entity framework ? Pin
Mycroft Holmes9-Jan-19 19:51
memberMycroft Holmes9-Jan-19 19:51 
AnswerRe: is it safe to use this with sql server and entity framework ? Pin
Eddy Vluggen10-Jan-19 2:17
mveEddy Vluggen10-Jan-19 2:17 
QuestionGetting error in SQL 2012 working fine in 2016 Pin
GaneshVidiyala25-Dec-18 21:41
professionalGaneshVidiyala25-Dec-18 21:41 
AnswerRe: Getting error in SQL 2012 working fine in 2016 Pin
jschell27-Dec-18 13:34
memberjschell27-Dec-18 13:34 
Questionssrs An attempt has been made to use a data extension 'ORACLE' error Pin
anjel8425-Dec-18 20:34
memberanjel8425-Dec-18 20:34 
AnswerRe: ssrs An attempt has been made to use a data extension 'ORACLE' error Pin
rnbergren24-Jan-19 8:24
memberrnbergren24-Jan-19 8:24 
QuestionCan't Insert data into Access Table from Python - Solved Pin
Peter R. Fletcher5-Dec-18 15:16
memberPeter R. Fletcher5-Dec-18 15:16 
AnswerRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan5-Dec-18 22:19
protectorRichard MacCutchan5-Dec-18 22:19 
The float built-in only takes a single parameter, you are passing two, so that code will fail. Also you have specified two values in your insert statement but you are trying to pass only one.Victor pointed out my mistake.

[edit]
Having looked at the documentation, I guess that the extra parentheses round your values may be the problem. The example is:
cursor.execute("insert into products(id, name) values (?, ?)", 'pyodbc', 'awesome library')

So perhaps your code should be:
cur2.execute('INSERT INTO RawValues (Millitime, PowerCost) VALUES (?,?)', float(row[0]), row[1])


[/edit]

modified 6-Dec-18 7:54am.

GeneralRe: Can't Insert data into Access Table from Python Pin
Victor Nijegorodov6-Dec-18 1:09
memberVictor Nijegorodov6-Dec-18 1:09 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan6-Dec-18 1:21
protectorRichard MacCutchan6-Dec-18 1:21 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher6-Dec-18 2:11
memberPeter R. Fletcher6-Dec-18 2:11 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan6-Dec-18 3:16
protectorRichard MacCutchan6-Dec-18 3:16 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher6-Dec-18 4:37
memberPeter R. Fletcher6-Dec-18 4:37 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan6-Dec-18 5:11
protectorRichard MacCutchan6-Dec-18 5:11 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan8-Dec-18 4:46
protectorRichard MacCutchan8-Dec-18 4:46 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher8-Dec-18 5:04
memberPeter R. Fletcher8-Dec-18 5:04 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan8-Dec-18 5:58
protectorRichard MacCutchan8-Dec-18 5:58 
GeneralRe: Can't Insert data into Access Table from Python Pin
Peter R. Fletcher8-Dec-18 7:36
memberPeter R. Fletcher8-Dec-18 7:36 
GeneralRe: Can't Insert data into Access Table from Python Pin
Mycroft Holmes8-Dec-18 11:52
memberMycroft Holmes8-Dec-18 11:52 
GeneralRe: Can't Insert data into Access Table from Python Pin
Richard MacCutchan8-Dec-18 21:09
protectorRichard MacCutchan8-Dec-18 21:09 
QuestionError reading data from SQL Server ? Pin
Member 24584673-Dec-18 22:25
memberMember 24584673-Dec-18 22:25 
AnswerRe: Error reading data from SQL Server ? Pin
ZurdoDev4-Dec-18 2:22
professionalZurdoDev4-Dec-18 2:22 
AnswerRe: Error reading data from SQL Server ? Pin
Eddy Vluggen4-Dec-18 2:55
mveEddy Vluggen4-Dec-18 2:55 
GeneralRe: Error reading data from SQL Server ? Pin
Member 24584674-Dec-18 17:15
memberMember 24584674-Dec-18 17:15 
GeneralRe: Error reading data from SQL Server ? Pin
Eddy Vluggen5-Dec-18 1:44
mveEddy Vluggen5-Dec-18 1:44 

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.