B
B
beduin012015-03-01 21:01:04
Database
beduin01, 2015-03-01 21:01:04

Why does a null query always return a database type object?

I can’t understand why the cursor always needs to be moved when fetching data from the database and getting a value with index 1, not 0. It’s just that if I do without it, I get a link to the connection instance object (or whatever it’s called correctly - correct pliz) type: ddbc.driver.bla-bla-bla

auto lastparsetime = stmt.executeQuery("SELECT LastParseTime FROM stat where URL='" ~ url ~ "';");
while(lastparsetime.next())
{
  dt = (DateTime.fromSimpleString(lastparsetime.getString(1)));
}

Why is it impossible to do without While when fetching a value? Is it the same in C#?
PS I use this driver code.dlang.org/packages/ddbc

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Optimus, 2015-03-01
Pyan @marrk2

So in the rows of the database, the numbering in AutoIncrement starts from 1, this is in arrays from 0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question