Comments (2)
I run into problems with quotes often. That is a SQL issue more than anything. I would hesitate to modify the query. But I could try to perform some type of validation check and present a warning.
from mysqlite.
Dodgy workaround Jeff, if it works it's ok isn't it ;-)?
$jsonData | ForEach-Object -Begin {
$cx = Open-MySQLiteDB $dbpath
} -Process {
try {
$value = $.Value -replace "'", "''"
$query = "INSERT INTO asd VALUES (
'$($.H3)',
'$($.H4)',
'$($.H5)',
'$($.Title)',
'$($.Filename)',
'$($.Weight)',
'$($.Url)',
'$item',
'$value'
)"
Invoke-MySQLiteQuery -Connection $cx -KeepAlive -Query $query
} catch {
Write-Host "Error: $"
}
} -End {
Close-MySQLiteDB $cx
}
from mysqlite.
Related Issues (20)
- Add PropertyMap parameter HOT 1
- Need a way to get table details HOT 2
- Add Typename parameter to ConvertTo-MySQLiteDB HOT 1
- create an auto incrementing table HOT 2
- Create commands for opening and closing connections HOT 1
- Add Query to ConvertFrom-MySQLiteDB HOT 1
- Module Name Confusion HOT 2
- Error converting get-process result into sqlite HOT 14
- Converting all AD user properties fails HOT 5
- ConvertFrom-MySQLiteDB doesn't restore blobs HOT 2
- Suggestion - Use native clixml methods to avoid need for temp files HOT 5
- Cmdlet checks on ".db" file's extension HOT 3
- Error in Open-MySQLiteDB.ps1 HOT 1
- Questions about capabilities HOT 6
- Help Needed: Non-Windows Platform Support HOT 23
- New-MySQLiteDB HOT 10
- DateTime object parsing HOT 4
- Passing malformed query to "Invoke-MySQLiteQuery", resulting in SQLite Error/Warning does not raise exception HOT 2
- Add a password protection option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysqlite.