View previous topic :: View next topic |
Author |
Message |
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Sat Apr 21, 2007 10:29 pm Post subject: Access Violation when using row['name'] with 1.012 or 1.013 |
|
|
Greetings.
I am using the SQLite ddbi libraries and though I keep getting this bogus error messages, I am working somewhat ok. However, after updating my dmd version from 1.010 to 1.013 and I am getting access violation when using row['colname']. This same procedure
Code: | char[][] Row2CharArray(Row r)
{
SQLCols = std.string.split("id login cust proj bdate edate pm lang vendor notes status");
char[][] dd;
foreach (char[] field; SQLCols)
{
dd.length = dd.length + 1;
dd [dd.length - 1] = r[field];
}
return dd;
}
|
works with dmd 1.010, but it does not work with 1.012 nor with 1.013.
Any ideas?
thanks,
jic |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Tue Apr 24, 2007 12:04 am Post subject: |
|
|
Is anyone else using SQLite with the DDBI libraries or am I the only one? |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Tue Apr 24, 2007 8:32 am Post subject: |
|
|
The only one? That's quite possible. I know that at least I'm not.
If you get a working binary out of DMD 1.010, but not anything newer, then it's very likely a codegen bug, and not a problem with SQLite. Is there anything on DMD's bugzilla that matches what you're seeing? _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Tue Apr 24, 2007 10:04 am Post subject: |
|
|
pragma wrote: | The only one? That's quite possible. I know that at least I'm not. |
je je je je... That's a Spanish sarcastic laugh. As you know, the j in Spanish is like an h.
pragma wrote: | If you get a working binary out of DMD 1.010, but not anything newer, then it's very likely a codegen bug, and not a problem with SQLite. Is there anything on DMD's bugzilla that matches what you're seeing? |
I have not gone there in a while. No time, but I'll visit also. I also upgraded my SQLite DLL to 3.3.13, which was the last one on the code, but that also did not fixed the problem. |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Tue Apr 24, 2007 10:11 am Post subject: |
|
|
One more question, are you able to use the row["colname"] with any other DDBI library as in MySQL, etc? I believe the Row library has the same source code for all libraries (MySQL, SQLite, etc.), correct? |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Wed Apr 25, 2007 8:02 am Post subject: |
|
|
jicman wrote: | One more question, are you able to use the row["colname"] with any other DDBI library as in MySQL, etc? I believe the Row library has the same source code for all libraries (MySQL, SQLite, etc.), correct? |
I've only used DBBI with Postgresql, and it works very well. _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
jicman
Joined: 22 Dec 2004 Posts: 298 Location: Rochester, NY
|
Posted: Wed Apr 25, 2007 11:51 pm Post subject: |
|
|
So, to update this post, I created this small program,
Code: | import std.stdio;
import dbi.sqlite.SqliteDatabase;
import dbi.Row;
void main()
{
SqliteDatabase db = new SqliteDatabase();
db.connect("test.db");
db.execute("CREATE TABLE Names ( id primary key, name );");
//add sample data
db.execute("INSERT INTO Names values( 'jic','jose');");
db.execute("INSERT INTO Names values( 'bah','pedro');");
Row[] rows = db.queryFetchAll("SELECT * FROM Names");
foreach (Row row; rows) {
writefln("name:" ~ row["name"] ~ "\n");
}
db.close();
} |
and I compiled it with 1.013 and it worked. Then I tried my other program, and it worked. I really can tell you what happened, but maybe, compiling this small program cleaned some cache bad something. Dunno. But anyway, I am able to compile my program again with 1.013.
thanks,
jose |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|