views:

69

answers:

3

I can't believe this is the first time this has come up. I have a script that looks like this:

drop table if exists Recipients

drop table if exists Messages

create table Recipients (
    Id INTEGER not null,
   Name TEXT,
   Email TEXT,
   primary key (Id)
)

create table Messages (
    Id INTEGER not null,
   Subject TEXT,
   Contents TEXT,
   SentOn DATETIME,
   primary key (Id)
)

and I just want to run it against a SQLite connection in my server explorer but the only way I can find of executing SQL is against the silly query builder.

I don't need a visual anything. I just need a pad that I can hit "Execute" on and it will run the script.

+2  A: 

Not sure about SQLite, but for SQL Express connection you can right-click on the server node in Data Connections in Server Explorer and choose "New Query". Then you can paste in your query and click the red ! button to run it.

Even though the query builder might show up, one of the panes allows you to type in any query you want. If that pane doesn't show up, right click anywhere in the query builder, choose Pane, and make sure that "SQL" is enabled.

Eilon
Nope, it pops up a visual query builder and pasting the script in says provider does not support it.
George Mauer
@George, ah then sorry I'm afraid I don't know. I guess each provider can provide its own experience in VS.
Eilon
+2  A: 
sqlite3 filename.db < input.sql
Roger Pate
Really? can't do it through the sql provider?
George Mauer
bah, that's another download and their website is down
George Mauer
@George: Eh? Did you mean you can't get sqlite3.exe? http://sqlite.org/download.html is working for me now.
Roger Pate
Yeah it was down
George Mauer
A: 

I use http://sqliteadmin.orbmu2k.de/

Theo