Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Friday, March 30, 2012

MSDE Text datatype - unable to store more than 900 characters. (msde + visual studio 2003)

Hello,
I'm not sure if it's the setup I did wrong, but I can't seem to get mytext datatype in my database to store more than 900 characters. I'm trying to setup a news database for my website, which will populatethe information into a datagrid. To test, I manually added a newsitem in the database through the visual studio 2003 gui. Iimmediately noticed a problem as the I was getting an error after along news item saying:
"The value you entered is not consistent with the data type or length of the column, or over grid buffer limit."
I couldn't find anthing to set the buffer limit and the datatype is"text" filled with simple text in the column. As a further test,Isimply entered 12334567890123... up to 900 characters and stillrecevied the error.
I would appreciate someone leading me in the right direction on this one.
Thanks a lot.
I think may be your create table statement was not executed correctly because text can grow it is not table space based SQL Server creates an Arithmetic pointer to the file. Try the link below see if you can download the eval edition of the SQL Server. Or you could drop the table and recreate it and test again. Hope this helps.
http://www.microsoft.com/sql/evaluation/trial/default.mspx

MSDE sql express on laptop, error 26

hi, I am running Visual Studio.net 2005 on my laptop, MSDE sql express was
installed during the installation, finally trying to get an sql database to
work, i am a newbie to both Visual studio and SQL, anyway i can see the
database inside server explorer and all its talbles, but when i try to run
the application i get an error has occured while establishing a connection
the the server, When connecting to SQL server 2005, this failure may be
caused by the fact that under the default settings SQL server does not allow
remote connections, (provider SQL network interfaces, error:26 error
locatiang server/instance Specified
i read similar posts in this forum and tried the following
enabled TCP/Ip on the server and client, do i need any of the other
protocols enabled: shared memory is enabled, named pipes is disabled, tcp/ip
is enablaed and VIA is disabled, this is for the server, for the client
shared memory, tcp/ip, named pipes are all enabled while via is disabled
i ran the SQL server surface area configuration and choose the Surface area
configuration for servcies and connections, under there, the radio buttion
for local and remote connection/Using TCP/IP only are selected. so i think
that is ok
i copi8ed a SQL database to a folder in the database and set the connection
using the wizard, i tested the connection and it is ok.
are there other things to do are other places to check,
Possibility 1:
Start the SQL Server Browser Service. SQL Server 2005 Express installs as a
named instance called sqlexpress. The SQL Server Browser Service resolves a
connection attempt of <computer_name>\sqlexpress to a port number. Without
SQL Server Browser, when connecting to a named instance you need to specify
the port number when you connect. And all named instances like SQL Server
2005 listen on dynamic ports, so the port may change when SQL Server is
started.
Possibility 2:
If you are running on a laptop, you may be running on Windows XP, service
pack 2 which automatically turns on the Windows firewall. If you are
connecting from the same server, you should be connecting using Shared
Memory so that won't matter. If you are connecting from another computer,
you may need to open a TCP port, or allow sqlservr.exe to communicate
through the firewall.
If this information is helpful, more information is available at
http://msdn2.microsoft.com/en-us/library/ms345318(en-US,SQL.90).aspx
Rick Byham
MCDBA, MCSE, MCSA
Lead Technical Writer,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"Frank Bruhn" <FrankBruhn@.discussions.microsoft.com> wrote in message
news:E96EEA76-4277-4D80-8B75-79D945744E95@.microsoft.com...
> hi, I am running Visual Studio.net 2005 on my laptop, MSDE sql express was
> installed during the installation, finally trying to get an sql database
> to
> work, i am a newbie to both Visual studio and SQL, anyway i can see the
> database inside server explorer and all its talbles, but when i try to run
> the application i get an error has occured while establishing a connection
> the the server, When connecting to SQL server 2005, this failure may be
> caused by the fact that under the default settings SQL server does not
> allow
> remote connections, (provider SQL network interfaces, error:26 error
> locatiang server/instance Specified
> i read similar posts in this forum and tried the following
> enabled TCP/Ip on the server and client, do i need any of the other
> protocols enabled: shared memory is enabled, named pipes is disabled,
> tcp/ip
> is enablaed and VIA is disabled, this is for the server, for the client
> shared memory, tcp/ip, named pipes are all enabled while via is disabled
> i ran the SQL server surface area configuration and choose the Surface
> area
> configuration for servcies and connections, under there, the radio buttion
> for local and remote connection/Using TCP/IP only are selected. so i think
> that is ok
> i copi8ed a SQL database to a folder in the database and set the
> connection
> using the wizard, i tested the connection and it is ok.
> are there other things to do are other places to check,
>
>

MSDE sql express on laptop, error 26

hi, I am running Visual Studio.net 2005 on my laptop, MSDE sql express was
installed during the installation, finally trying to get an sql database to
work, i am a newbie to both Visual studio and SQL, anyway i can see the
database inside server explorer and all its talbles, but when i try to run
the application i get an error has occured while establishing a connection
the the server, When connecting to SQL server 2005, this failure may be
caused by the fact that under the default settings SQL server does not allow
remote connections, (provider SQL network interfaces, error:26 error
locatiang server/instance Specified
i read similar posts in this forum and tried the following
enabled TCP/Ip on the server and client, do i need any of the other
protocols enabled: shared memory is enabled, named pipes is disabled, tcp/i
p
is enablaed and VIA is disabled, this is for the server, for the client
shared memory, tcp/ip, named pipes are all enabled while via is disabled
i ran the SQL server surface area configuration and choose the Surface area
configuration for servcies and connections, under there, the radio buttion
for local and remote connection/Using TCP/IP only are selected. so i think
that is ok
i copi8ed a SQL database to a folder in the database and set the connection
using the wizard, i tested the connection and it is ok.
are there other things to do are other places to check,Possibility 1:
Start the SQL Server Browser Service. SQL Server 2005 Express installs as a
named instance called sqlexpress. The SQL Server Browser Service resolves a
connection attempt of <computer_name>\sqlexpress to a port number. Without
SQL Server Browser, when connecting to a named instance you need to specify
the port number when you connect. And all named instances like SQL Server
2005 listen on dynamic ports, so the port may change when SQL Server is
started.
Possibility 2:
If you are running on a laptop, you may be running on Windows XP, service
pack 2 which automatically turns on the Windows firewall. If you are
connecting from the same server, you should be connecting using Shared
Memory so that won't matter. If you are connecting from another computer,
you may need to open a TCP port, or allow sqlservr.exe to communicate
through the firewall.
If this information is helpful, more information is available at
http://msdn2.microsoft.com/en-us/library/ms345318(en-US,SQL.90).aspx
--
Rick Byham
MCDBA, MCSE, MCSA
Lead Technical Writer,
Microsoft, SQL Server Books Online
This posting is provided "as is" with
no warranties, and confers no rights.
"Frank Bruhn" <FrankBruhn@.discussions.microsoft.com> wrote in message
news:E96EEA76-4277-4D80-8B75-79D945744E95@.microsoft.com...
> hi, I am running Visual Studio.net 2005 on my laptop, MSDE sql express was
> installed during the installation, finally trying to get an sql database
> to
> work, i am a newbie to both Visual studio and SQL, anyway i can see the
> database inside server explorer and all its talbles, but when i try to run
> the application i get an error has occured while establishing a connection
> the the server, When connecting to SQL server 2005, this failure may be
> caused by the fact that under the default settings SQL server does not
> allow
> remote connections, (provider SQL network interfaces, error:26 error
> locatiang server/instance Specified
> i read similar posts in this forum and tried the following
> enabled TCP/Ip on the server and client, do i need any of the other
> protocols enabled: shared memory is enabled, named pipes is disabled,
> tcp/ip
> is enablaed and VIA is disabled, this is for the server, for the client
> shared memory, tcp/ip, named pipes are all enabled while via is disabled
> i ran the SQL server surface area configuration and choose the Surface
> area
> configuration for servcies and connections, under there, the radio buttion
> for local and remote connection/Using TCP/IP only are selected. so i think
> that is ok
> i copi8ed a SQL database to a folder in the database and set the
> connection
> using the wizard, i tested the connection and it is ok.
> are there other things to do are other places to check,
>
>

Monday, March 26, 2012

MSDE Seems to Install - Service Manager Loads - No Connection

Hi,
I uninstalled MSDE 2000 prior to installing SQL Server 2000 Developer
Edition. I then found I could not use Developer Edition with Visual Basic
..net Standard Edition and tried to reinstall MSDE. The installation seems
to go fine but when the Service Manager loads is tells me "Not Connected -
\\" no servers are in the Server drop-down and no services are listed in
the Services drop-down. I am very new to all of this and would very much
appreciate any help/advice you could offer. I have since uninstalled
Developer Edition to no avail. I am running Windows XP Pro.
Regards
Barry-Jon
hi Barry-Jon,
Microsoft wrote:
> Hi,
> I uninstalled MSDE 2000 prior to installing SQL Server 2000 Developer
> Edition. I then found I could not use Developer Edition with Visual
> Basic .net Standard Edition and tried to reinstall MSDE. The
> installation seems to go fine but when the Service Manager loads is
> tells me "Not Connected - \\" no servers are in the Server drop-down
> and no services are listed in the Services drop-down. I am very new
> to all of this and would very much appreciate any help/advice you
> could offer. I have since uninstalled Developer Edition to no avail.
> I am running Windows XP Pro.
> Regards
> Barry-Jon
please have a look at
http://support.microsoft.com/default...b;EN-US;814132 ...
you can modify this behaviour enabling the desired/required network protocol
by running the Server Network Utility (svrnetcn.exe)...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||"Microsoft" <barryjonoconnell_spam_no@.yahoo.co.uk> wrote in message
news:ucCLTwKEFHA.1188@.tk2msftngp13.phx.gbl...
> Hi,
> I uninstalled MSDE 2000 prior to installing SQL Server 2000 Developer
> Edition. I then found I could not use Developer Edition with Visual Basic
> .net Standard Edition and tried to reinstall MSDE. The installation seems
> to go fine but when the Service Manager loads is tells me "Not Connected -
> \\" no servers are in the Server drop-down and no services are listed in
> the Services drop-down. I am very new to all of this and would very much
> appreciate any help/advice you could offer. I have since uninstalled
> Developer Edition to no avail. I am running Windows XP Pro.
> Regards
> Barry-Jon
I posted this in the vb group as well, but just in case...
I'm not sure you're doing anything wrong, but perhaps the instructions we
use for classroom/lab installs of MSDE to work with Visual Studio .NET 2003
will be helpful:
<quote>
1. Before you begin, check the PC to ensure there are no remnants of prior
MSDE installation attempts hanging around. The place to check is: C:\Program
Files\Microsoft SQL Server. If you locate a folder named Microsoft SQL
Server, delete it and its contents!
2. Execute the file: SQL2KDeskSP3.exe(or whatever the file name for your
MSDE download is). This step will extract the contents of the file to a
designated folder. Make a note of the destination folder. You'll need it
later. This step does not install MSDE (although the dialogs seem to hint
that it does)!
4. Navigate to the folder you created in Step 2. In that folder, you will
find a subfolder named MSDE. In MSDE, you will find SETUP.EXE. Executing
SETUP.EXE will install MSDE.
5. To execute SETUP.EXE correctly, you must supply an instance name and a
system administrator password as part of the command: i.e. the command must
be:
SETUP.EXE INSTANCENAME="NetSDK" SAPWD="yourSAPassword"
where yourSAPassword is your actual system administrator password. This
password is needed only to install MDSE, not to use it. Access to MSDE is
controlled by normal "NT Security" which should allow users access based on
network logon and password. It is very important the the INSTANCENAME
parameter be NetSDK, as this name will enable you to generate the sample
databases automatically instead of having to run SQL scripts from the
command line.
6. Once installation is complete, you must reboot the PC before you will
see MSDE. After the reboot, you should see the MSDE icon in SysTray.
7. You now must execute the file: ConfigSamples.exe to configure sample
applications and MSDE system databases. This step will also create user
databases in the following location: C:\Program Files\Microsoft SQL
Server\MSSQL\Data.
</quote>
If you have trouble locating the ConfigSamples.exe, it's a small file
(56k) and I can send it to your email if needed.
Hope this helps.
Peter [MVP Visual Developer]
Jack of all trades, master of none.
|||Thanks Peter - that looks pretty much like what I did in the end. Saved
your post in case I ever forget :-)
"Peter van der Goes" <p_vandergoes@.toadstool.u> wrote in message
news:edfqWhQEFHA.3592@.TK2MSFTNGP15.phx.gbl...
> "Microsoft" <barryjonoconnell_spam_no@.yahoo.co.uk> wrote in message
> news:ucCLTwKEFHA.1188@.tk2msftngp13.phx.gbl...
> I posted this in the vb group as well, but just in case...
> I'm not sure you're doing anything wrong, but perhaps the instructions we
> use for classroom/lab installs of MSDE to work with Visual Studio .NET
> 2003 will be helpful:
> <quote>
> 1. Before you begin, check the PC to ensure there are no remnants of
> prior MSDE installation attempts hanging around. The place to check is:
> C:\Program Files\Microsoft SQL Server. If you locate a folder named
> Microsoft SQL Server, delete it and its contents!
>
> 2. Execute the file: SQL2KDeskSP3.exe(or whatever the file name for your
> MSDE download is). This step will extract the contents of the file to a
> designated folder. Make a note of the destination folder. You'll need it
> later. This step does not install MSDE (although the dialogs seem to hint
> that it does)!
>
> 4. Navigate to the folder you created in Step 2. In that folder, you will
> find a subfolder named MSDE. In MSDE, you will find SETUP.EXE. Executing
> SETUP.EXE will install MSDE.
>
> 5. To execute SETUP.EXE correctly, you must supply an instance name and a
> system administrator password as part of the command: i.e. the command
> must be:
>
> SETUP.EXE INSTANCENAME="NetSDK" SAPWD="yourSAPassword"
>
> where yourSAPassword is your actual system administrator password. This
> password is needed only to install MDSE, not to use it. Access to MSDE is
> controlled by normal "NT Security" which should allow users access based
> on network logon and password. It is very important the the INSTANCENAME
> parameter be NetSDK, as this name will enable you to generate the sample
> databases automatically instead of having to run SQL scripts from the
> command line.
>
> 6. Once installation is complete, you must reboot the PC before you will
> see MSDE. After the reboot, you should see the MSDE icon in SysTray.
>
> 7. You now must execute the file: ConfigSamples.exe to configure sample
> applications and MSDE system databases. This step will also create user
> databases in the following location: C:\Program Files\Microsoft SQL
> Server\MSSQL\Data.
> </quote>
>
> If you have trouble locating the ConfigSamples.exe, it's a small file
> (56k) and I can send it to your email if needed.
>
> Hope this helps.
>
> --
> Peter [MVP Visual Developer]
> Jack of all trades, master of none.
>

MSDE replacing Access2000 in VB Application

I support a Visual Basic application, about 150,000 lines. It's basic
functionality is to pull data from an Oracle database and store it in arrays,
then perform about 6 dozen different kinds of analysis on the data, as the
user chooses.
Access 2000 is used in two fashions, both behind the scenes and static. (1)
The data from Oracle is temporarily stored in one MDB for cross-tabbing and
reorganization into the VB arrays. (2) Certain reference databases are
populated in other MDB files in order to support off-line analysis. Also,
user-defined associations are stored in a separate MDB.
So here are the questions: would I benefit from the use of MSDE? If not, why
not (to explain to boss and customer). If yes, how, and with what kind of
effort?
Thanks!
If you're making heavy use of cross-tab queries, that's probably
reason enough right there to stick with Access mdb's. It's much harder
to do in SQL Server, and you'd need to rewrite that entire piece of
your application. It doesn't appear that there are really any
advantages to using MSDE in your case since you also require
heterogeneous queries to Oracle, which is also much easier from
Access. It works differently in SQL Server, and you'd need to rewrite
a lot of your data access functionality as well. I can't really think
of any benefit to migrating this particular app to MSDE unless you're
getting paid by the hour :-)
-- Mary
On Tue, 14 Sep 2004 10:03:03 -0700, Rick Coen
<rick.coen@.eds.com.nospam> wrote:

>I support a Visual Basic application, about 150,000 lines. It's basic
>functionality is to pull data from an Oracle database and store it in arrays,
>then perform about 6 dozen different kinds of analysis on the data, as the
>user chooses.
>Access 2000 is used in two fashions, both behind the scenes and static. (1)
>The data from Oracle is temporarily stored in one MDB for cross-tabbing and
>reorganization into the VB arrays. (2) Certain reference databases are
>populated in other MDB files in order to support off-line analysis. Also,
>user-defined associations are stored in a separate MDB.
>So here are the questions: would I benefit from the use of MSDE? If not, why
>not (to explain to boss and customer). If yes, how, and with what kind of
>effort?
>Thanks!
|||I agree with Mary but wanted to point out that the next version of MSDE (Sql
server 2005 express) is supposed to support the cross tab queries (PIVOT I
think)
"Mary Chipman" <mchip@.online.microsoft.com> wrote in message
news:g4fek0lnib00ce9nimo5urm9jb2vssgn5n@.4ax.com... [vbcol=seagreen]
> If you're making heavy use of cross-tab queries, that's probably
> reason enough right there to stick with Access mdb's. It's much harder
> to do in SQL Server, and you'd need to rewrite that entire piece of
> your application. It doesn't appear that there are really any
> advantages to using MSDE in your case since you also require
> heterogeneous queries to Oracle, which is also much easier from
> Access. It works differently in SQL Server, and you'd need to rewrite
> a lot of your data access functionality as well. I can't really think
> of any benefit to migrating this particular app to MSDE unless you're
> getting paid by the hour :-)
> -- Mary
> On Tue, 14 Sep 2004 10:03:03 -0700, Rick Coen
> <rick.coen@.eds.com.nospam> wrote:
arrays,[vbcol=seagreen]
the[vbcol=seagreen]
(1)[vbcol=seagreen]
and[vbcol=seagreen]
Also,[vbcol=seagreen]
why[vbcol=seagreen]
of
>

MSDE reinstall.

I had MSDE installed on my machine, but I had problems making it work. I installed the Visual Studio 2005Beta2, and it apparently installed MSDE 2005. I deinstalled MSDE 2000, then tried to make MSDE 2005 work. After lots of hair pulling I finally found the instance name, reset the authenitcation method, and reset the SA password. Then I found out all my sql tools don't work with it. No enterprise manager or query analyzer. So off MSCE 2005 came from my machine. I reinstalled MSCE 2000, but I cannot login. I am not sure if I don't have the proper instance name, or password for the sa account. I have not really found any good into on setting up the msce 2000 software. I think it found the old username/password info because whtn I started it, it did not ask me for any of that information.
How can I reload/set the admin password? I would like to get it going so I can start playing with visual studio 2005. I sure hope it knows how to play with MSDE 2000 properly.

Jr.CoderCleaning up really old threads; I assume you got this resolved one way or another long since?

MSDE reinstall.

I had MSDE installed on my machine, but I had problems making it work. I installed the Visual Studio 2005Beta2, and it apparently installed MSDE 2005. I deinstalled MSDE 2000, then tried to make MSDE 2005 work. After lots of hair pulling I finally found the instance name, reset the authenitcation method, and reset the SA password. Then I found out all my sql tools don't work with it. No enterprise manager or query analyzer. So off MSCE 2005 came from my machine. I reinstalled MSCE 2000, but I cannot login. I am not sure if I don't have the proper instance name, or password for the sa account. I have not really found any good into on setting up the msce 2000 software. I think it found the old username/password info because whtn I started it, it did not ask me for any of that information.
How can I reload/set the admin password? I would like to get it going so I can start playing with visual studio 2005. I sure hope it knows how to play with MSDE 2000 properly.

Jr.CoderCleaning up really old threads; I assume you got this resolved one way or another long since?

Friday, March 23, 2012

MSDE Question

Hope MSDE questions ok here. I would like to distribute a MSDE
application on CD ROM. I don't have any of the packaging solutions i.e.
Visual Studio, Office Developer or VB Pro. I'm using MS Web Matrix to
build an ASP.Net front for MSDE.

How distributable is MSDE without the additional distribution products?

Would I need to load up MSDE from the CD Rom then execute some long
scripts to build my tables and stored procs I use in the application?
Should I just get one of the professional development products listed
above and use the distribution tools?

Help / Input appreciated.
Steve

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"Steve Bishop" <steveb@.viper.com> wrote in message
news:407d352f$0$197$75868355@.news.frii.net...
> Hope MSDE questions ok here. I would like to distribute a MSDE
> application on CD ROM. I don't have any of the packaging solutions i.e.
> Visual Studio, Office Developer or VB Pro. I'm using MS Web Matrix to
> build an ASP.Net front for MSDE.
> How distributable is MSDE without the additional distribution products?
> Would I need to load up MSDE from the CD Rom then execute some long
> scripts to build my tables and stored procs I use in the application?
> Should I just get one of the professional development products listed
> above and use the distribution tools?
> Help / Input appreciated.
> Steve
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

You can install MSDE using just a command line - check the readme for the
latest MSDE download, which lists all the parameters to setup.exe.

After you install it, you can run your object creation scripts with
osql.exe, or possibly include a database backup and simply restore it, which
is quick and easy, although of course you have no flexibility to create
objects conditionally.

I'm not familiar with the packaging tools you mention - you might get better
information in a .NET or ASP forum.

Simon

Monday, March 19, 2012

MSDE login problem

Hi all,

I have bought Visual C# .NET 2003 Standard and downloaded the MSDE to use
with it.

I did install it with it's default options and now i'd like to administer it
with Web Data Administrator but it keeps telling me that i should enable SQL
Server Authentication.

So i tried debugging the question creating an .udl file and trying to test
various authentication methods:
- Integrated Windows authentication works fine
- SQL Server authentication (when i try logging in using user 'sa' with the
password i've set keeps telling me that user 'sa' is not associated with a
trusted SQL Server connection.

How do i solve this puzzle? Tried googling (and reading some faqs) but
didn't come up with anything useful.

Unfortunately the Web Data Administrator doesn't allow using integrated NT
authentication. :-(

Thank You,
LorenzoCheck out MSKB 321698:

https://mvp.support.microsoft.com/d...kb;en-us;321698

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"Lorenzo Bolognini" <lorenzo@.mysurname.net> wrote in message
news:jNaYa.42647$cl3.1359277@.news2.tin.it...
> Hi all,
> I have bought Visual C# .NET 2003 Standard and downloaded the MSDE to
use
> with it.
> I did install it with it's default options and now i'd like to
administer it
> with Web Data Administrator but it keeps telling me that i should
enable SQL
> Server Authentication.
> So i tried debugging the question creating an .udl file and trying to
test
> various authentication methods:
> - Integrated Windows authentication works fine
> - SQL Server authentication (when i try logging in using user 'sa'
with the
> password i've set keeps telling me that user 'sa' is not associated
with a
> trusted SQL Server connection.
> How do i solve this puzzle? Tried googling (and reading some faqs) but
> didn't come up with anything useful.
> Unfortunately the Web Data Administrator doesn't allow using
integrated NT
> authentication. :-(
> Thank You,
> Lorenzo|||"Dan Guzman" <danguzman@.nospam-earthlink.net> ha scritto nel messaggio
news:p_hYa.241$BC2.47@.newsread2.news.atl.earthlink .net...
> Check out MSKB 321698:

Thank you very much Dan.

Lorenzo

Friday, March 9, 2012

MSDE installer problem

Hi
I'm working in visual C++ and through it I start MSDE setup.exe. I have to
wait in my VC++ code before the MSDE installer is finished totally. The
problem i'm having is that as soon as I initiate the process of MSDE
setup.exe, i get its finished status in my VC waiting code, though the
installer is still running. I've tried running the MSDE setup.exe from the
command line and i see that the status also come back to prompt just a
second after the setup.exe is run. I was wondering how can i keep the
control from coming back to the setup.exe instantiating application unless
the whole setup.exe is complete. Hope i've made my point clear.
Regards
Usman Jamil
Hi Usman,
Try this code: here WaitForSingleObject( ) waits till your process gets completed. I used the same for installing MSDE through my setup launcher.
Cheers
Piyush
int ExecCmd(char * pszCmd )
{
BOOL bReturnVal = false ;
STARTUPINFO si ;
DWORD dwExitCode ;
SECURITY_ATTRIBUTES saProcess, saThread ;
PROCESS_INFORMATION process_info ;
ZeroMemory(&si, sizeof(si)) ;
si.cb = sizeof(si) ;
saProcess.nLength = sizeof(saProcess) ;
saProcess.lpSecurityDescriptor = NULL ;
saProcess.bInheritHandle = TRUE ;
saThread.nLength = sizeof(saThread) ;
saThread.lpSecurityDescriptor = NULL ;
saThread.bInheritHandle = FALSE ;
bReturnVal = CreateProcess(NULL, (LPTSTR)pszCmd, &saProcess, &saThread, FALSE,
DETACHED_PROCESS,
NULL,
NULL,
&si,
&process_info) ;
if (bReturnVal)
{
CloseHandle( process_info.hThread ) ;
WaitForSingleObject( process_info.hProcess, INFINITE ) ;
GetExitCodeProcess( process_info.hProcess, &dwExitCode ) ;
CloseHandle( process_info.hProcess ) ;
}
return dwExitCode;
}
"Usman Jamil" <usman@.advcomm.net> wrote in message news:O11ArM2WEHA.2716@.tk2msftngp13.phx.gbl...
> Hi
> I'm working in visual C++ and through it I start MSDE setup.exe. I have to
> wait in my VC++ code before the MSDE installer is finished totally. The
> problem i'm having is that as soon as I initiate the process of MSDE
> setup.exe, i get its finished status in my VC waiting code, though the
> installer is still running. I've tried running the MSDE setup.exe from the
> command line and i see that the status also come back to prompt just a
> second after the setup.exe is run. I was wondering how can i keep the
> control from coming back to the setup.exe instantiating application unless
> the whole setup.exe is complete. Hope i've made my point clear.
> Regards
> Usman Jamil
>
|||Hi viki
I dont know how it worked in your case but its not supposed to work and i've
checked it too. It wont work coz the Waitforsingleobject would also return
as soon as the process created is finished. and when we run the process
setup.exe, this setup.exe script asks the windows installer service to run
the actull installer and it exits itself thus breaking the
waitforsingleobject lock too. So it would not work for MSDE installer from
C++ code. Anyway thanx for your help.
Still waiting for a solution..
Regards
Usman Jamil
"viki" <piyush__jain@.hotmail.com> wrote in message
news:eZ5ZQ3MXEHA.1144@.TK2MSFTNGP10.phx.gbl...
Hi Usman,
Try this code: here WaitForSingleObject( ) waits till your process gets
completed. I used the same for installing MSDE through my setup launcher.
Cheers
Piyush
int ExecCmd(char * pszCmd )
{
BOOL bReturnVal = false ;
STARTUPINFO si ;
DWORD dwExitCode ;
SECURITY_ATTRIBUTES saProcess, saThread ;
PROCESS_INFORMATION process_info ;
ZeroMemory(&si, sizeof(si)) ;
si.cb = sizeof(si) ;
saProcess.nLength = sizeof(saProcess) ;
saProcess.lpSecurityDescriptor = NULL ;
saProcess.bInheritHandle = TRUE ;
saThread.nLength = sizeof(saThread) ;
saThread.lpSecurityDescriptor = NULL ;
saThread.bInheritHandle = FALSE ;
bReturnVal = CreateProcess(NULL, (LPTSTR)pszCmd, &saProcess, &saThread,
FALSE,
DETACHED_PROCESS,
NULL,
NULL,
&si,
&process_info) ;
if (bReturnVal)
{
CloseHandle( process_info.hThread ) ;
WaitForSingleObject( process_info.hProcess, INFINITE ) ;
GetExitCodeProcess( process_info.hProcess, &dwExitCode ) ;
CloseHandle( process_info.hProcess ) ;
}
return dwExitCode;
}
"Usman Jamil" <usman@.advcomm.net> wrote in message
news:O11ArM2WEHA.2716@.tk2msftngp13.phx.gbl...
> Hi
> I'm working in visual C++ and through it I start MSDE setup.exe. I have to
> wait in my VC++ code before the MSDE installer is finished totally. The
> problem i'm having is that as soon as I initiate the process of MSDE
> setup.exe, i get its finished status in my VC waiting code, though the
> installer is still running. I've tried running the MSDE setup.exe from the
> command line and i see that the status also come back to prompt just a
> second after the setup.exe is run. I was wondering how can i keep the
> control from coming back to the setup.exe instantiating application unless
> the whole setup.exe is complete. Hope i've made my point clear.
> Regards
> Usman Jamil
>
|||Hi viki
I dont know how it worked in your case but its not supposed to work and i've
checked it too. It wont work coz the Waitforsingleobject would also return
as soon as the process created is finished. and when we run the process
setup.exe, this setup.exe script asks the windows installer service to run
the actull installer and it exits itself thus breaking the
waitforsingleobject lock too. So it would not work for MSDE installer from
C++ code. Anyway thanx for your help.
Still waiting for a solution..
Regards
Usman Jamil
"viki" <piyush__jain@.hotmail.com> wrote in message
news:eZ5ZQ3MXEHA.1144@.TK2MSFTNGP10.phx.gbl...
Hi Usman,
Try this code: here WaitForSingleObject( ) waits till your process gets
completed. I used the same for installing MSDE through my setup launcher.
Cheers
Piyush
int ExecCmd(char * pszCmd )
{
BOOL bReturnVal = false ;
STARTUPINFO si ;
DWORD dwExitCode ;
SECURITY_ATTRIBUTES saProcess, saThread ;
PROCESS_INFORMATION process_info ;
ZeroMemory(&si, sizeof(si)) ;
si.cb = sizeof(si) ;
saProcess.nLength = sizeof(saProcess) ;
saProcess.lpSecurityDescriptor = NULL ;
saProcess.bInheritHandle = TRUE ;
saThread.nLength = sizeof(saThread) ;
saThread.lpSecurityDescriptor = NULL ;
saThread.bInheritHandle = FALSE ;
bReturnVal = CreateProcess(NULL, (LPTSTR)pszCmd, &saProcess, &saThread,
FALSE,
DETACHED_PROCESS,
NULL,
NULL,
&si,
&process_info) ;
if (bReturnVal)
{
CloseHandle( process_info.hThread ) ;
WaitForSingleObject( process_info.hProcess, INFINITE ) ;
GetExitCodeProcess( process_info.hProcess, &dwExitCode ) ;
CloseHandle( process_info.hProcess ) ;
}
return dwExitCode;
}
"Usman Jamil" <usman@.advcomm.net> wrote in message
news:O11ArM2WEHA.2716@.tk2msftngp13.phx.gbl...
> Hi
> I'm working in visual C++ and through it I start MSDE setup.exe. I have to
> wait in my VC++ code before the MSDE installer is finished totally. The
> problem i'm having is that as soon as I initiate the process of MSDE
> setup.exe, i get its finished status in my VC waiting code, though the
> installer is still running. I've tried running the MSDE setup.exe from the
> command line and i see that the status also come back to prompt just a
> second after the setup.exe is run. I was wondering how can i keep the
> control from coming back to the setup.exe instantiating application unless
> the whole setup.exe is complete. Hope i've made my point clear.
> Regards
> Usman Jamil
>

Wednesday, March 7, 2012

MSDE Installation Confusion

I recently obtained Visual C++ .NET 2003, and am under the impression that I
have to install MSDE to provide SQL support for applications I write.
Do I need to install SQLServer as well? (None of the documentation I have
read so far says so, but some comments I have read make me want
confirmation).
Regards
Dave
Hi Dave,
If you have SQL Server, you have no need to install the MSDE. The MSDE is
basically a cut-down SQL Server mostly used for deployment with apps where
the client doesn't have SQL Server. For development, you should use the
Developer Edition of SQL Server.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Dave Bolt" <dave@.NO_SPAM_PLEASE_davebolt.fsnet.co.uk> wrote in message
news:usPPlBk5EHA.2012@.TK2MSFTNGP15.phx.gbl...
>I recently obtained Visual C++ .NET 2003, and am under the impression that
>I have to install MSDE to provide SQL support for applications I write.
> Do I need to install SQLServer as well? (None of the documentation I have
> read so far says so, but some comments I have read make me want
> confirmation).
> Regards
> Dave
>
|||Thanks lots for that clarification.
Regards
Dave
"Greg Low [MVP]" <greglow@.lowell.com.au> wrote in message
news:%23wWf3Xl5EHA.1264@.TK2MSFTNGP12.phx.gbl...
> Hi Dave,
> If you have SQL Server, you have no need to install the MSDE. The MSDE is
> basically a cut-down SQL Server mostly used for deployment with apps where
> the client doesn't have SQL Server. For development, you should use the
> Developer Edition of SQL Server.
> HTH,
> --
> Greg Low [MVP]
> MSDE Manager SQL Tools
> www.whitebearconsulting.com
> "Dave Bolt" <dave@.NO_SPAM_PLEASE_davebolt.fsnet.co.uk> wrote in message
> news:usPPlBk5EHA.2012@.TK2MSFTNGP15.phx.gbl...
>