Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Thursday, March 29, 2012

Dreaded "SQL Server does not exist or access denied. " Error

I have built a web application that runs on my local web server against my local SQL server and my development server, but now I'm trying to get it to work on the live server and I'm not getting a connection. Whenever I try to open the connection, I get a.

SQL Server does not exist or access denied.

error.

Here is my connection string...

Public connString as string

Dim SQLServerAsString = "xxx.xx.xx.xxx"

connString = "server=" & SQLServer & ";" _

& "database=DBName;Trusted_Connection=No;user id=xxxID;password=xxxPassword;"

myConnection2 =New SqlClient.SqlConnection(connString)

------------------

I'm starting my connection to run a datareader this way...

Dim strSQLAsString

strSQL = "SELECT ClientID, ClientName " & _

"FROM Client; "

' Create a connection to the table in the SQL database located on

' the remote computer.

Dim myCommand2AsNew SqlClient.SqlCommand(strSQL, myConnection2)

myCommand2.CommandTimeout = 1200

myConnection2.Open() 'HERE IS WHERE THE ERROR OCCURS

Dim myReaderAs SqlClient.SqlDataReader = myCommand2.ExecuteReader(CommandBehavior.CloseConnection)

While myReader.Read()

-------------------

I can communicate with the server with no problem from my local computer. I can ping the server, and I also tested it by creating a system DSN using the login and password in my application, and it finds the database with no problem. I've tried to connect using the SQL Server's server name and the IP address and both return the same result. I've also saw something in another post to set the trusted connection parameter to "yes" and that didn't work either.

I'm developing on a Windows XP Professional and I'm trying to connect to a Windows 2003 Server with SQL Server 2000 installed on the machine.

I did add the database by restoring a backup from my local server onto the live server. I don't think that should matter, but maybe it does. If anyone has any ideas, I would greatly appreciate it.

Try adding this to the end of your connection string and see if it makes a difference:
;Network Library =dbmssocn
This will force a TCP/IP connection instead of a named pipes connection.

(fromBUG: Named pipes do not work when worker process runs under ASPNET account)|||Thanks for the suggestion. Unfortunately that didn't work. Could there be some server firewall setting that is preventing the web user account from accessing the server?|||I would also try adding a port number to the end of the IP address:

Dim SQLServerAsString = "xxx.xx.xx.xxx,1433"

And I would remove Trusted_Connection=No completely. Seehttp://www.connectionstrings.comfor connection string examples. If none of that works, perhapsthe user ID and password are incorrect? Sorry, just grasping atstraws. My last recommendation is to review this KB article:Potential causes of the "SQL Server does not exists or access denied" error message. As you'll see, there are a lot of things to check.|||Thanks for your help. It looks like the problem stemmed from a security hole in Windows 2003 Server, which was shutting down the TCP ports. We applied SP4 and it seems to be working for now. Hopefully that's all it was.

drawbacks of Saving documents to Sql server

Hi all,
..Net 1.1
Sql server 2000
i am working on a document managment module of my application, all i want to
do here is save the documents uplaoded by the user from my winforms over
webservices application\ webforms applicatoin to sql server 2000. I have been
told saving it on the webserver's file system might be a better way but seems
that microsft is gong more towars saving everthing in sql server. So my
question to the gurus out there is
1. does any one really have any hands on experience saving documents to sql
server 2000 and if so please tell me if u have any kind of performance issues
with this.
2. i was told that sql server is kind of a little slow in streaming out the
documents from the database, expecially bigger ones when compared to the
retriving it from the web server's file system, is this true ?
3. please tell me any other problesm that u might have faced when saving\
retriving files from the database.
4. is sql server 2005 any better in saving and retriving documents from the
database.
thanks
sameer
Answered in .programming.
Please do not post the same message independently to multiple newsgroups.
sql

drawbacks of Saving documents to Sql server

Hi all,
.Net 1.1
Sql server 2000
i am working on a document managment module of my application, all i want to
do here is save the documents uplaoded by the user from my winforms over
webservices application\ webforms applicatoin to sql server 2000. I have been
told saving it on the webserver's file system might be a better way but seems
that microsft is gong more towars saving everthing in sql server. So my
question to the gurus out there is
1. does any one really have any hands on experience saving documents to sql
server 2000 and if so please tell me if u have any kind of performance issues
with this.
2. i was told that sql server is kind of a little slow in streaming out the
documents from the database, expecially bigger ones when compared to the
retriving it from the web server's file system, is this true ?
3. please tell me any other problesm that u might have faced when saving\
retriving files from the database.
4. is sql server 2005 any better in saving and retriving documents from the
database.
thanks
sameerAnswered in .programming.
Please do not post the same message independently to multiple newsgroups.

drawbacks of Saving documents to Sql server

Hi all,
.Net 1.1
Sql server 2000
i am working on a document managment module of my application, all i want to
do here is save the documents uplaoded by the user from my winforms over
webservices application\ webforms applicatoin to sql server 2000. I have bee
n
told saving it on the webserver's file system might be a better way but seem
s
that microsft is gong more towars saving everthing in sql server. So my
question to the gurus out there is
1. does any one really have any hands on experience saving documents to sql
server 2000 and if so please tell me if u have any kind of performance issue
s
with this.
2. i was told that sql server is kind of a little slow in streaming out the
documents from the database, expecially bigger ones when compared to the
retriving it from the web server's file system, is this true ?
3. please tell me any other problesm that u might have faced when saving\
retriving files from the database.
4. is sql server 2005 any better in saving and retriving documents from the
database.
thanks
sameerAnswered in .programming.
Please do not post the same message independently to multiple newsgroups.

Tuesday, March 27, 2012

DR replication-how to's

Let me start with this: We have a critical SQL application on a Win 2003
with SQL 2000 sp3a. I set up another Win 2003 server with SQL 2000 sp3a.
From posts read I believe log shipping is what I want, the files can be
replicated overnight and appears to be easiest to manage. OK, my questions:
do I want log shipping? Is that the easiest way for DR purposes, ie recovery
time?
Also, I'm running into problems and I can't seem to find a simple how to do
this on microsoft's site. My number one problem appears to stem from the
initial installation, it was submitted as a local instance. Is there a way
around this? Say, make the backup server as the distrubutor and subscriber
and then make the main a publisher?
Another problem I'm having is that it's failing on the Distrubutor portion,
it's saying it fails because it is a local system account. WHen I go tto
change the account every user on the server is either unknown or invalid.
Does anyone know a solution for this? Is there any documentation? I can't
seem to find help on microsoft's site.
First off, log shipping is probably the best choice for a DR solution.
Replication can work, but you need to do a fair amount of configuring to
make this work.
I am a little confused by your second and third questions. You suddenly
start talking about replication.If you are talking about a remote
distributor, then it seems like you are using replication to provide DR.
Please review this kb article to understand the complexity of what you are
trying to do.
http://support.microsoft.com/default...b;en-us;886839
I think you third problem results from not having created a local NT user
account. Create this account, put it in the sys admins role, and then have
SQL Server agent run under this account.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Mike" <Mike@.discussions.microsoft.com> wrote in message
news:3E7923F1-C4D3-46D0-830E-0DCB04236C55@.microsoft.com...
> Let me start with this: We have a critical SQL application on a Win 2003
> with SQL 2000 sp3a. I set up another Win 2003 server with SQL 2000 sp3a.
> From posts read I believe log shipping is what I want, the files can be
> replicated overnight and appears to be easiest to manage. OK, my
questions:
> do I want log shipping? Is that the easiest way for DR purposes, ie
recovery
> time?
> Also, I'm running into problems and I can't seem to find a simple how to
do
> this on microsoft's site. My number one problem appears to stem from the
> initial installation, it was submitted as a local instance. Is there a
way
> around this? Say, make the backup server as the distrubutor and
subscriber
> and then make the main a publisher?
> Another problem I'm having is that it's failing on the Distrubutor
portion,
> it's saying it fails because it is a local system account. WHen I go tto
> change the account every user on the server is either unknown or invalid.
> Does anyone know a solution for this? Is there any documentation? I
can't
> seem to find help on microsoft's site.
sql

Sunday, March 25, 2012

Downloading data into a txt file

Dear All,

I have an application running on my mobile device and the data is stored in the mobile database. So now i am trying to build any application on my pc which upon click should download the data from my mobile database into a local text file. Is there any idea or reference where I can stary working on this ?

DataSet ds = new DataSet();

...

DataAdapter da = new DataAdapter(...);

da.Fill(ds, "table1");

...

da.Fill(ds, "tableN");

ds.WriteXml("LocalTextFile.xml");

If XML is not what you want then write data row by row in the format you want using System.IO namespace.

|||

Dear Ilya,

I would prefer it to be in text file format. The problem what project shall I develop I mean in the visual studio 2005. Should it be windows form or device application ? Because if it is device application it cant run in my desktop rite ? So it should be windows form rite ? Thanks.

|||

Dear Ilya,

I have now build a new console application. So then I add a reference to

System.Data.SqlServerCe; to enable me to connect to the mobile database found in the pda. So when I try to run I get an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". The problem is that on the same machine I can compile my device application which is also using the same reference'System.Data.SqlServerCe. Please correct me if I am doing something wrong here. Another thing is that how must I reference the path to my mobile database in the pda ? I am trying like this I dont know if this is right

Mobile Device/MiniSD Card/MiniSD Card/test1/db1.sdf. Thanks.

|||

Dear All,

I have a problem here. What i exactly want to do it that build a console application where when I connect my pda to my desktop and run the exe file it should be able to transfer the .sdf data into a text file of my local desktop ? Is there any code or reference where can guide me ?

|||Some of the components from www.primeworks-mobile.com should be able to help you.|||

Dear ErikEJ,

I would prefer to write on my own as I cant afford third party software. Hope you can show me some light into it. Thanks.

|||What you are going to want to probably do is copy the database from the device to your desktop, then use the sql ce for the desktop libs (remember you can use sql ce on devices and full blown windows) to read through the database and output . You can accomplish copying the database over through code using the Windows CE RAPI. The full framework as far as I know does not have built-in support for it. So what you would need to do is P/Invoke some functions in the rapi.dll. Luckily somebody has essentially done this, look for the opennetcf's (www.opennetcf.org) desktop communication library. So once you use this to get a copy of the database over to your desktop you can use the sql ce for windows (not wm or ce) libs to connect to your now local copy of the database. Then using a SqlCeDataReader you can just iterate through every record in the database, while reading a record in you can format it however you like then push that into a file using a StreamWriter object.
|||

Dear Steve,

Thank you very much for your kind information. So now I have downloaded the OpenNETCF.Desktop.Communication Library . Now how shall I start ? Shall I start by building a console application ? So must I first manually download the database or the system can do it for me ? I am really at lost can your pls guide me further on this. Thanks once again.

|||If you want to do it as a console application then start there. Then my next step would be to use the Desktop Communication library to programmatically get the database from your device to local computer. The communication library should have came with an example application that you can probably look at to find out how they copy files back and forth. You can look their and do the same thing.
|||

Dear Steve,

Ok I have followed and done accordingly and sucessfully download the sdf file into my desktop. My next problem is that i am not able to connect to downloaded .sdf in the desktop. I am using the same code as I build the windows device application. Can your please tell me wat can be my mistake ? For example I use this

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?

So what can be possible error on my side ? Thanks.

|||

Dear Steve,

I am ok with Desktop Communication library. I have already managed to download the database from the device to my local computer. My next step is that how can I from my console application link to the database which I have already downloaded using the said library. Thanks once again.

|||Once you have the sdf file over to you desktop you can use the desktop version of the sqlce data object. I think you need to download the Microsoft SQL Server Mobile 2005 Mobile Edition SDK. Once you have that downloaded and installed it you should be able to add the proper references to the desktop x86 version of the libraries that you need. Then you should be able to connect to the database and use it just like you did on the handheld with the .NET CF. You should be able to just use a SqlCeDataReader object to query the database then read through the returned records and output them using a StreamWriter object to put them into a text file which you can then control the format of.
|||

Dear Steve,

I have already downloaded the microsoft sql server mobile 2005 mobile edition sdk. So I tried to use the SqlCeDataReader and below is the errors I got. Can you please guide me on this ?

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve that problem but got another one "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?Thanks.

Downloading data into a txt file

Dear All,

I have an application running on my mobile device and the data is stored in the mobile database. So now i am trying to build any application on my pc which upon click should download the data from my mobile database into a local text file. Is there any idea or reference where I can stary working on this ?

DataSet ds = new DataSet();

...

DataAdapter da = new DataAdapter(...);

da.Fill(ds, "table1");

...

da.Fill(ds, "tableN");

ds.WriteXml("LocalTextFile.xml");

If XML is not what you want then write data row by row in the format you want using System.IO namespace.

|||

Dear Ilya,

I would prefer it to be in text file format. The problem what project shall I develop I mean in the visual studio 2005. Should it be windows form or device application ? Because if it is device application it cant run in my desktop rite ? So it should be windows form rite ? Thanks.

|||

Dear Ilya,

I have now build a new console application. So then I add a reference to

System.Data.SqlServerCe; to enable me to connect to the mobile database found in the pda. So when I try to run I get an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". The problem is that on the same machine I can compile my device application which is also using the same reference'System.Data.SqlServerCe. Please correct me if I am doing something wrong here. Another thing is that how must I reference the path to my mobile database in the pda ? I am trying like this I dont know if this is right

Mobile Device/MiniSD Card/MiniSD Card/test1/db1.sdf. Thanks.

|||

Dear All,

I have a problem here. What i exactly want to do it that build a console application where when I connect my pda to my desktop and run the exe file it should be able to transfer the .sdf data into a text file of my local desktop ? Is there any code or reference where can guide me ?

|||Some of the components from www.primeworks-mobile.com should be able to help you.|||

Dear ErikEJ,

I would prefer to write on my own as I cant afford third party software. Hope you can show me some light into it. Thanks.

|||What you are going to want to probably do is copy the database from the device to your desktop, then use the sql ce for the desktop libs (remember you can use sql ce on devices and full blown windows) to read through the database and output . You can accomplish copying the database over through code using the Windows CE RAPI. The full framework as far as I know does not have built-in support for it. So what you would need to do is P/Invoke some functions in the rapi.dll. Luckily somebody has essentially done this, look for the opennetcf's (www.opennetcf.org) desktop communication library. So once you use this to get a copy of the database over to your desktop you can use the sql ce for windows (not wm or ce) libs to connect to your now local copy of the database. Then using a SqlCeDataReader you can just iterate through every record in the database, while reading a record in you can format it however you like then push that into a file using a StreamWriter object.
|||

Dear Steve,

Thank you very much for your kind information. So now I have downloaded the OpenNETCF.Desktop.Communication Library . Now how shall I start ? Shall I start by building a console application ? So must I first manually download the database or the system can do it for me ? I am really at lost can your pls guide me further on this. Thanks once again.

|||If you want to do it as a console application then start there. Then my next step would be to use the Desktop Communication library to programmatically get the database from your device to local computer. The communication library should have came with an example application that you can probably look at to find out how they copy files back and forth. You can look their and do the same thing.
|||

Dear Steve,

Ok I have followed and done accordingly and sucessfully download the sdf file into my desktop. My next problem is that i am not able to connect to downloaded .sdf in the desktop. I am using the same code as I build the windows device application. Can your please tell me wat can be my mistake ? For example I use this

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?

So what can be possible error on my side ? Thanks.

|||

Dear Steve,

I am ok with Desktop Communication library. I have already managed to download the database from the device to my local computer. My next step is that how can I from my console application link to the database which I have already downloaded using the said library. Thanks once again.

|||Once you have the sdf file over to you desktop you can use the desktop version of the sqlce data object. I think you need to download the Microsoft SQL Server Mobile 2005 Mobile Edition SDK. Once you have that downloaded and installed it you should be able to add the proper references to the desktop x86 version of the libraries that you need. Then you should be able to connect to the database and use it just like you did on the handheld with the .NET CF. You should be able to just use a SqlCeDataReader object to query the database then read through the returned records and output them using a StreamWriter object to put them into a text file which you can then control the format of.
|||

Dear Steve,

I have already downloaded the microsoft sql server mobile 2005 mobile edition sdk. So I tried to use the SqlCeDataReader and below is the errors I got. Can you please guide me on this ?

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve that problem but got another one "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?Thanks.

Thursday, March 22, 2012

Downgrading SQLServer to MSDE

Hi,
I am pretty new to MSDE and am just researching options for writing a .NET
version of a desktop application (currently VB6 / Access).
There is a web version of our product available already which has a SQL
Server backend.
I am figuring that I will use MSDE so I can use all their Stored procedures
and as much code of theirs as possible.
What I am wondering is if I can get downgrade from SQL Server to MSDE ?
There's lots of information about upgrading, but nothing about downgrading.
Thanks
Sanj
hi,
Sanjit Suchak wrote:
> Hi,
> I am pretty new to MSDE and am just researching options for writing a
> .NET version of a desktop application (currently VB6 / Access).
> There is a web version of our product available already which has a
> SQL Server backend.
> I am figuring that I will use MSDE so I can use all their Stored
> procedures and as much code of theirs as possible.
> What I am wondering is if I can get downgrade from SQL Server to MSDE
> ? There's lots of information about upgrading, but nothing about
> downgrading.
downgrading is a viable solution as long as you take into consideration all
relevant MSDE limitations..
2gb database size, limited replication support, no OLAP features, no
Reporting Services... and limited number of users scenarios... these are the
most relevant of them in my opinion... but the core features are all
available...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Downgrading sql server 2005

Hi
Would any .net application developed for sql server 20005 server edition
work on sql server 2005 express edition? This is in case the target client
does not have a license of sql server 2005 server edition.
Thanks
Regards
It′s a bit different as the differences in SQL Server 200 vs. MSDE.
The main features are also build in SQL Server 2005 Express, but some are
cut (there has to be a reason to buy the full featured product ;-) )
http://msdn.microsoft.com/library/de...seoverview.asp
There is a section naming: "Features not present in SQL Server Express", you
should check if there are some feature named that youwant to use in your
deployable application.
HTH, jens Suessmeyer.
http://www.sqlserver2005.de

Downgrading sql server 2005

Hi
Would any .net application developed for sql server 20005 server edition
work on sql server 2005 express edition? This is in case the target client
does not have a license of sql server 2005 server edition.
Thanks
RegardsIt′s a bit different as the differences in SQL Server 200 vs. MSDE.
The main features are also build in SQL Server 2005 Express, but some are
cut (there has to be a reason to buy the full featured product ;-) )
http://msdn.microsoft.com/library/d...r />
rview.asp
There is a section naming: "Features not present in SQL Server Express", you
should check if there are some feature named that youwant to use in your
deployable application.
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
--sql

Downgrading sql server 2005

Hi
Would any .net application developed for sql server 20005 server edition
work on sql server 2005 express edition? This is in case the target client
does not have a license of sql server 2005 server edition.
Thanks
RegardsIt´s a bit different as the differences in SQL Server 200 vs. MSDE.
The main features are also build in SQL Server 2005 Express, but some are
cut (there has to be a reason to buy the full featured product ;-) )
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sseoverview.asp
There is a section naming: "Features not present in SQL Server Express", you
should check if there are some feature named that youwant to use in your
deployable application.
HTH, jens Suessmeyer.
--
http://www.sqlserver2005.de
--

Wednesday, March 21, 2012

'downgrade' sql server 2005

I developed my application using SQL2005 Developer edition. but my clients
wants it free with SQL2005 Express. How exactly to migrate my DB in Dev
Edition to Express?
As long as your DB is less than 4gb .Backup and restore.
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"Patrick Yong" <patrickyong@.newsgroups.nospam> wrote in message
news:eTmqj1gQGHA.4900@.TK2MSFTNGP09.phx.gbl...
> I developed my application using SQL2005 Developer edition. but my clients
> wants it free with SQL2005 Express. How exactly to migrate my DB in Dev
> Edition to Express?
>

'downgrade' sql server 2005

I developed my application using SQL2005 Developer edition. but my clients
wants it free with SQL2005 Express. How exactly to migrate my DB in Dev
Edition to Express?As long as your DB is less than 4gb .Backup and restore.
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"Patrick Yong" <patrickyong@.newsgroups.nospam> wrote in message
news:eTmqj1gQGHA.4900@.TK2MSFTNGP09.phx.gbl...
> I developed my application using SQL2005 Developer edition. but my clients
> wants it free with SQL2005 Express. How exactly to migrate my DB in Dev
> Edition to Express?
>

'downgrade' sql server 2005

I developed my application using SQL2005 Developer edition. but my clients
wants it free with SQL2005 Express. How exactly to migrate my DB in Dev
Edition to Express?As long as your DB is less than 4gb .Backup and restore.
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"Patrick Yong" <patrickyong@.newsgroups.nospam> wrote in message
news:eTmqj1gQGHA.4900@.TK2MSFTNGP09.phx.gbl...
> I developed my application using SQL2005 Developer edition. but my clients
> wants it free with SQL2005 Express. How exactly to migrate my DB in Dev
> Edition to Express?
>

downgrade MDAC version

Hi
we have one application that does not work in Vista OS. The application
uses MDAC and I checked the Vista OS computer and the MDAC version is shown
6.0. Is there a way to downgrade to 2.8?
Or can you think other reasons to prevent application run on the Vista OS?
Thank you.
This is not possible. Most stuff should be backwards compatible. What is not
working?
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
"John" <John@.discussions.microsoft.com> wrote in message
news:E7E17A6E-F4D7-4937-9732-B2C26D357773@.microsoft.com...
> Hi
> we have one application that does not work in Vista OS. The application
> uses MDAC and I checked the Vista OS computer and the MDAC version is
> shown
> 6.0. Is there a way to downgrade to 2.8?
> Or can you think other reasons to prevent application run on the Vista OS?
> Thank you.
>
|||Great. thank you for your help.
This application when installed on the XP machines works fine. But, when it
is on the Vista machine, I click to use and got "network connection
unavailable cancel to workoffline" I can not log on to the application and
only work offline.
Any clue?
"Jason Massie" wrote:

> This is not possible. Most stuff should be backwards compatible. What is not
> working?
> --
> Jason Massie
> Web: http://statisticsio.com
> RSS: http://feeds.feedburner.com/statisticsio
> "John" <John@.discussions.microsoft.com> wrote in message
> news:E7E17A6E-F4D7-4937-9732-B2C26D357773@.microsoft.com...
>
>

Downgrade Install Plan

We are upgrading an application that is not yet supported on SQL Server 2005. The upgrade involves new hardware (including a new sql server). Any gotchas or advice regarding this plan:

1. Install Windows 2003 64 bit, configure hardware appropriately for running SQL Server.

2. Install SQL Server 2000 64 bit using the 2005 license key (is that how you 'downgrade'? I didn't see a 'how-to' article regarding this).

3. Restore backups of system databases from current SQL Server to new SQL Server (note: current SQL Server is running 32 bit - I realize that I need to make sure that I have the same service pack on the new server as that on the current server).

4. Apply sp4.

5. Restore user databases.

Not sure if the 32 vs. 64 bit thing is of any concern or if 'downgrading' is as simple as this.

Thanks!

Michelle

1. What is the version of current SQL Server? SQL Server 2005 requires SP1 for Windows 2003 Enterprise Edittion on x64 machines.

2. I do not think you can install SQL Server 2000 with SQL Server 2005 product key.

The following issues are clear.

1. SQL Server 2000 and SQL Server 2005 can be installed side by side successfully.

2. 32-bit SQL Server 2000/2005 can be installed side by side successfully on x64 machines.

3. 32-bit SQL Server 2005 and 64-bit SQL Server 2005 can be installed successfully on x64 machines.

|||I did talk to our Microsoft Solution Specialist and he explained that

we should already have the required license and media to install SQL

Server 2000 with our most recent media kit shipment. I don't think that

I will be prompted for a license key at all.

I'm hoping that the server admin team will be finished with the

hardware/os in the next couple of days so that I can start on my

portion. I'll document any issues that I have.

Thanks,

Michelle|||

Michelle,

Did you have any problems with your original installation plan? We are trying to do the same installation and it is unclear how to install 2000 with 2005 disks and keys. There is no prompting on install.

|||I did not have any problems but in hindsight had wished that I had

installed SQL Server 2005 as the default instance and 2000 as a named

instance. I believe that this would have made the upgrade to 2005

simpler. We have since built other machines this way.

Downgrade Install Plan

We are upgrading an application that is not yet supported on SQL Server 2005. The upgrade involves new hardware (including a new sql server). Any gotchas or advice regarding this plan:

1. Install Windows 2003 64 bit, configure hardware appropriately for running SQL Server.

2. Install SQL Server 2000 64 bit using the 2005 license key (is that how you 'downgrade'? I didn't see a 'how-to' article regarding this).

3. Restore backups of system databases from current SQL Server to new SQL Server (note: current SQL Server is running 32 bit - I realize that I need to make sure that I have the same service pack on the new server as that on the current server).

4. Apply sp4.

5. Restore user databases.

Not sure if the 32 vs. 64 bit thing is of any concern or if 'downgrading' is as simple as this.

Thanks!

Michelle

1. What is the version of current SQL Server? SQL Server 2005 requires SP1 for Windows 2003 Enterprise Edittion on x64 machines.

2. I do not think you can install SQL Server 2000 with SQL Server 2005 product key.

The following issues are clear.

1. SQL Server 2000 and SQL Server 2005 can be installed side by side successfully.

2. 32-bit SQL Server 2000/2005 can be installed side by side successfully on x64 machines.

3. 32-bit SQL Server 2005 and 64-bit SQL Server 2005 can be installed successfully on x64 machines.

|||I did talk to our Microsoft Solution Specialist and he explained that we should already have the required license and media to install SQL Server 2000 with our most recent media kit shipment. I don't think that I will be prompted for a license key at all.
I'm hoping that the server admin team will be finished with the hardware/os in the next couple of days so that I can start on my portion. I'll document any issues that I have.
Thanks,
Michelle
|||

Michelle,

Did you have any problems with your original installation plan? We are trying to do the same installation and it is unclear how to install 2000 with 2005 disks and keys. There is no prompting on install.

|||I did not have any problems but in hindsight had wished that I had installed SQL Server 2005 as the default instance and 2000 as a named instance. I believe that this would have made the upgrade to 2005 simpler. We have since built other machines this way.

Monday, March 19, 2012

Doubt in " HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual C# .

Hi,

In my application, I need to copy data from an Excel file into a SQL
table. The article related to this can be found at

http://support.microsoft.com/defaul...Ben-us%3B306572

Using this,I am first extracting data from given excel file into a
temporary DataTable. After making some operations on that DataTable
(like splitting one column into two), I am saving the data into actual
table in SQL Server.

My doubt is that, in the above given link, there are few steps needed
to do on the excel file... eg.
--> Highlight the rows and columns where the data resides.
--> On the Insert menu, point to Name, and then click Define.
--> In the Names in workbook text box, type myRange1, and then click
OK.

I don't want my client to do thsese operations everytime he changes
contents in that excel file, as this excel file changes almost daily.
The extracting of data from excel file is done after clicking UPDATE
button on webpage. The person saving data into Excel file is differnet
from the one who updates it into SQL.

Is there any other way where we can directly copy data from excel file
into DataTable without doing the above three steps?

I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
language for this web-based project.

Any advice would be greatly appreciated. Thanks in advance.

Regards,
RK."RK" <rakish123@.yahoo.com> wrote in message
news:22626a3.0404020930.7d9bdd7e@.posting.google.co m...
> Hi,
> In my application, I need to copy data from an Excel file into a SQL
> table. The article related to this can be found at
> http://support.microsoft.com/defaul...Ben-us%3B306572
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?
> I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
> language for this web-based project.
> Any advice would be greatly appreciated. Thanks in advance.
> Regards,
> RK.

The article doesn't mention SQL Server anywhere, and it sounds like your
problem is how to automate something in Excel, so I guess you'll get a
better answer in an Excel or C# newsgroup.

Simon|||RK (rakish123@.yahoo.com) writes:
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?

Of course there is.

I have not tried to get data from Excel with SELECT statements, but
would be surprised if "SELECT * FROM Sheet1" would work. I've mainly
use the OLE interface to get data from Excel in Perl. While I understand
that you don't want users to have to highlight things, I fail to see
but that you need to have some pre-defined structure that the Excel
file must have, or else you will have no idea of what you are importing.

But while you said SQL Server twice in your posting (look again Simon! :-),
your question seems more to be related to Excel, so you should find a
group about Excel.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You might look at the capabilities of SQL Server DTS Packages. They can
read from Excel spreadsheets. However, your datasheet would have to be
massaged enough that the data was a fairly straightforward import.

I suppose if I were you, I'd use a combination of VBA code to hack up the
spreadsheet, save it to a convenient spreadsheet, then use SQL-DMO to
trigger a DTS package for the import.

Otherwise, you could just do a VBA module that would pass in the interesting
data directly over an ADO, OLEDB or ODBC connection. We've done something
like that, it wasn't terribly difficult.

"RK" <rakish123@.yahoo.com> wrote in message
news:22626a3.0404020930.7d9bdd7e@.posting.google.co m...
> Hi,
> In my application, I need to copy data from an Excel file into a SQL
> table. The article related to this can be found at
> http://support.microsoft.com/defaul...Ben-us%3B306572
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?
> I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
> language for this web-based project.
> Any advice would be greatly appreciated. Thanks in advance.
> Regards,
> RK.|||Hi,

There are a few alternatives. I recommend you to use SQL*XL an addin I
wrote for Excel to do these things. There are some other alternatives
which I will mention.

1. SQL*XL - addin for Excel to access your databases.
SQL*XL is an addin for Excel that allows you to access your database
directly from Excel. You can query data into Excel or you can pump
data from Excel into the database. SQL*XL focusses on making it easy
for the end user but it can also be used to make scripts as it is
fully compatible with Excel macro recording and VBA.

Have a look at SQL*XL at: www.oraxcel.com

2. Define your Excel workbook as a data source in ODBC
If you do this you can issue select statements against it. You can use
it in an openquery statement in SQL server or even make it a linked
server I suppose. Named ranges will appear as tables. Reserve row 1
for the column headers.
Problems with this technique: it is readonly, you may have problems
with accessing the workbook (in use)
The nice thing is that you can use it directly in SQL or DTS

3. You can write a little macro in Excel that dumps the file out in a
nominated format (CSV e.g) and a nominated directory. You could have
DTS to pickup the file and import it in your database table.

Hope this helps,

Gerrit-Jan Linker
Linker IT Consulting Limited
www.oraxcel.com
Author of SQL*XL

Doubt about SQL Server

I need an application to obtain the databases names from my SQL
Server, using Visual Basic 6.0.
Can somebody hel me?(aguzmanc@.gmail.com) writes:

Quote:

Originally Posted by

I need an application to obtain the databases names from my SQL
Server, using Visual Basic 6.0.
Can somebody hel me?


SELECT name FROM master..sysdatabases -- SQL 2000 or earlier
SELECT name FROM sys.databases -- SQL 2005.

Or what is you want help with?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Sunday, March 11, 2012

Double left joins with conditions

I have a setup in an Access database with linked tables to Oracle (its a remote application database that is synced when a connection is available). I have to perform inserts, updates, and deletes based upon records that have changed since the last update. In the examples of inserting records into oracle, I find records in access that do not exist in oracle and meet the date condition. Where I run into problems are in tables like [events]: I need to only be updating, inserting, and deleting events for a specific county but the only place county is designated is in the location table that events are tied to through lctn_id. I just can't figure out how to involve the location table join with the events table join and the necessary conditions.

locations (and locations_ora)
lctn_id, cnty_nbr, lctn_nm..., rec_dt

events (and events_ora)
evnt_id, lctn_id, evnt_txt, ..., rec_dt

Example of format used for another table:
INSERT INTO locations_ora SELECT DISTINCTROW a.* FROM locations a LEFT JOIN locations o ON a.lctn_id=o.lctn_id WHERE (o.lctn_id IS NULL) AND a.rec_dt>#8/17/2000 1:11:11 AM# AND a.cnty_nbr=5

How I would like to get events working:
INSERT INTO events_ora SELECT DISTINCTROW a.* FROM events AS a LEFT JOIN events_ora AS o ON a.evnt_id=o.evnt_id WHERE (o.evnt_id IS NULL) AND a.rec_dt>#8/17/2000 1:11:11 AM# AND {some way to only get events tied locations in a specific county}
-- or even --
INSERT INTO events_ora SELECT DISTINCTROW a.* FROM (SELECT a.* FROM events a LEFT JOIN locations l ON b.lctn_id=l.lctn_id WHERE l.cnty_nbr=5 ) LEFT JOIN events_ora o ON a.evnt_id=o.evnt_id WHERE (o.evnt_id IS NULL) AND a.rec_dt>#1/17/1979 1:11:11 AM#
(I thought this one would work but Access blows up on the SELECT after the FROM.)

Can anyone point me in the right direction?INSERT
INTO events_ora
SELECT a.*
FROM (
events a
inner
JOIN locations l
ON (
l.lctn_id = a.lctn_id
and l.cnty_nbr = 5
)
)
LEFT
JOIN events_ora o
ON o.evnt_id = a.evnt_id
WHERE a.rec_dt>#1/17/1979|||The traffic signals of North Carolina thank you immensely!

Seeing how this is done correctly and in the reading I've done on your site (since I figured you would be the likely responder to my thread) has definitely increased my understanding of how to work with SQL. You will now be added to the Whiteboard of Fame in conference room C-011.|||thanks :)

that's the nicest kudos i've received in a while