ATTACH database
I have a unique problem where ATTACH database seems to work fine when I'm using
a GUI tool, however when I pass the SQL string to the SQLite engine using
SqLiteCommand under .NET, it doesn't seem to work. I get an error saying
that D2.Table is not found.
SQL String:
ATTACH DATABASE 'F:/Users/name/Documents/ShowBuilder6/Database/2.sbx' AS XYZ;
SELECT * from [EquipmentCatalog] union select * from XYZ.EquipmentCatalog
Code:
// SQLite database builder
using (SQLiteConnection cn = new
SQLiteConnection(SBConnection.GetDatabaseConnection(_fileName)))
{
cn.Open();
SQLiteCommand cmd;
ResourceManager resourceManager = new
ResourceManager("ShowBuilder6.Library.Properties.StoredProcedures",
Assembly.GetExecutingAssembly());
for (int i = versions.IndexOf(_currentVersion); i <
versions.Count - 1; i++)
{
try
{
cmd = new
SQLiteCommand(resourceManager.GetString(/// the above Attach string, cn);
cmd.ExecuteNonQuery();
}
catch
{
}
}
}
Does anyone have the "ATTACH" command working from a .NET interface?
Again, I can get it to work using SQLite Developer, but doesn't seem to work in
code.
Thoughts?
Carlton
SR
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users