Showing posts with label window. Show all posts
Showing posts with label window. Show all posts

Monday, February 20, 2012

isqlw.exe from a console app

Can someone who knows a lot more about this than me please tell why, when the following code executes, I get a pop-up window telling me the usage of isqlw.exe?

<code>

strQueryCommandPath = "C:\\Program Files\\Microsoft SQL Server\\80\\Tools\\Binn\\";

strArguments = "-S(local)\\SQLEXPRESS ";

strArguments += "-Usa ";

strArguments += "-Padminmlc ";

strArguments += "-i" + strCurrentDir + strFileName + " ";

myProcess.StartInfo.WorkingDirectory = strQueryCommandPath;

myProcess.StartInfo.FileName = "ISQLW.EXE";

myProcess.StartInfo.Arguments = strArguments;

myProcess.StartInfo.UseShellExecute = false;

return myProcess.Start();

</code>

I've also tried it with a space in between the - switch and also with quotes around the switch arguments. I've put the entire path in just the StartInfo.FileName instead of switching the working directory as well. I can't for the life of me get it to actually fire off this command for some reason.

p.s. I've also tried using "/"s instead of "-"s as well.

Generally this is becuase you have one of the switches wrong... I would put some debug code to display the command line command that you are trying to run... then copy and past it to see what it look like.

|||I finally got all the switches to go through right, but now it's telling me access is denied to my My Documents folder (where the .bak file is) to do the restore. It keeps erroring and teminating the RESTORE command. It's not read only or anything (not that I'd think that would necessarily affect it) and I don't know why it would throw an OS access denied error on any part of my computer for me.

Isqlw for sql server mobile edition (sql ce 3)

In sql ce 2.0 in window ce 2003, I use isqlw20.exe to create database and table. Developed application with eVC++ 4.0

Now I have to use window mobile 5, VS 2005 for native C++ development, sql server mobile edition, but I can't found isqlw for this version of sql. I do not have sql server install in my desktop PC. So how could I create database and table with the pocket pc's database ?

Thanks.

ISQLW30.EXE is available from SQL Mobile 3.0 for Pocket PC and Pocket PC Phone Edition Devices/Emulators.

If you have installed SQL Mobile 3.0 cabs, you should find a shortcut getting created automatically in Start Menu.

Thanks,

Laxmi Narsimha Rao ORUGANTI, SQL Mobile, Microsoft Corporation