Skip to content

dbWriteTable fails for data frame with zero rows #35

Description

@ggrothendieck

dbWriteTable fails if the data frame has no rows. (Similar code does work with the RH2 driver for the H2 database.)

> library(RSQLite)
Loading required package: DBI
> con <- dbConnect(SQLite())
> DF <- data.frame(a = numeric(0), b = numeric(0))
> dbWriteTable(con, "DF", DF)
[1] FALSE
Warning message:
In value[[3L]](cond) : bind.data must have non-zero dimensions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions