Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Thursday, March 29, 2012

Extract a program from SQL 2000?

Hello,
We have a web based program that is using SQL 2000 as the db. Sql 2000 is running on a Windows 2003 server.

Is it possible to extract the SQL 2000 program(web based) with a clean db onto a blanket CD so another person can install it?

Any help would greatly be appreciated.

Mike

If you mean, is it possible to create an Installation disk for SQL Server, the answer is -No.

The 'another person' will have to purchase, or otherwise, legitimately obtain and license SQL Server.

Very, very Silly Question.

Tuesday, March 27, 2012

Extra character

Hi,

I used excel to import data to my database, I found out a problem, my program is linked with the database, when the program show data from the database, it has an extra '@.' symbol, In order to remove it, I need to go to the database to press space bar and backspace at the field. How could I use SQL instead of using space bar and backspace?

Thanks
FrenkHi,

I used excel to import data to my database, I found out a problem, my program is linked with the database, when the program show data from the database, it has an extra '@.' symbol, In order to remove it, I need to go to the database to press space bar and backspace at the field. How could I use SQL instead of using space bar and backspace?

Thanks
Frenk

If this is not a display problem, you can use replace() function to clean up the text.

e.g.
select replace(col,'@.',space(0))
from tb|||but the @. can not be seen in the database, and sometime it shows # instead could you please let me know what's happen|||Do those characters occur as the first character?|||no, it occurs at last character

that I normally do, first go to the last character, then press space bar and backspace, the @. or # will be disappeared|||Run this query and see if you see those characters

Select SubString(yourCol,1,len(yourCol)-1) from yourTable|||I can not see those character, the last character of each reocrd is missing.|||Well. Use that query to display in your application
If you want to remove those from table, then

Update yourTable Set yourCol=SubString(yourCol,1,len(yourCol)-1) where SubString(yourCol,1,len(yourCol)-1) in ('@.','#')

Friday, March 23, 2012

External Activation and Notification Services

I have been going over the samples from PDC 2005 and trying to run the External Activator program in section 2 'CLR Services'. After sending a message to the Inventory Queue, I see that 'dm_broker_queue_monitors' table has a row in the table, with the state column shown as 'NOTIFIED', but the ExternalActivator program never gets notified of the event and therefore never launches the 'InventoryServer' program.

Querying the [ExternalActivatorQueue] shows no rows.

Querying the [Inventory Queue] shows messages are waiting to be received.

Executing the 'activator' command in the ExternalActviator program shows

Notification service 'ExternalActivator' on SQL Server 'DBSERVER\' and Database 'In
ventory' is connected to the database and working.

Any Ideas?

Thanks,

-KuoAfter some browsing through code in the samples, I figured out the problem. The queue thats suppose to contain all the notification messages for the ExternalActivator program was checking the correct queue for messages, however no messages were being created in the [ExternalActivatorQueue] whenever a new message was sent to the [Inventory Queue].
So I, dDropped the event, 'en', and reran the create event notifcation:

drop event notification en on queue [Inventory Queue]

create event notification en
on queue [Inventory Queue]
for queue_activation
to service 'ExternalActivator', 'current database';

sent a few more messages and the ExternalActivatorQueue started getting messages in the queue whenever a new message was sent to the [Inventory Queue].

This is really strange. I know I must of ran the create event notification command a few times. Oh well, it works now.

-Mr.Kuo

Wednesday, March 21, 2012

Extended Stored Procedure Problem

I am using the Open Data Services to program an extended stored procedure.
The extended stored procedure is called from a table trigger. The problem I
am having is the call to srv_paramlen(...) returns 30 for a varchar(255)
variable even when the data is longer than 30. Therefore when I retrieve the
data as follows,
memcpy(pszColumnValue, srv_paramdata(srvproc, iIndex), len);
the data is truncated to 30 when the actual data stored in the DB is longer
than 30. Thanks very much for any help in solving this problem.
Charles...See SQL Server Books Online and you will find that srv_paramlen should no
longer be used and you should use srv_paraminfo instead
http://msdn.microsoft.com/library/d.../>
06_2rhq.asp
Important This Open Data Services function or macro is only supported in
Microsoft SQL ServerT 2000 for backward compatibility. It has been
superseded by the srv_paraminfo function.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Charles Parker" <charles.parker@.whamtect.com> wrote in message
news:e01GoHtCFHA.1432@.tk2msftngp13.phx.gbl...
>I am using the Open Data Services to program an extended stored procedure.
> The extended stored procedure is called from a table trigger. The problem
> I
> am having is the call to srv_paramlen(...) returns 30 for a varchar(255)
> variable even when the data is longer than 30. Therefore when I retrieve
> the
> data as follows,
> memcpy(pszColumnValue, srv_paramdata(srvproc, iIndex), len);
> the data is truncated to 30 when the actual data stored in the DB is
> longer
> than 30. Thanks very much for any help in solving this problem.
> Charles...
>

Monday, March 19, 2012

extended stored procedure

Hi
I wrote a Delphi program to create a dll.after that, I added an extended
procedure to sql server using this dll. unfortunately this extended procedur
e
is too slow ( for excution on a table with 100000 rows, it takes 1 minute to
finish the extended procedure) . I recognized that the lack of speed arises
from communication between sql and delphi. writing this procedure by sql led
to worse performance.
what should I do to speed up the extended procedure?
Thanks."Tajik" <Tajik@.discussions.microsoft.com> wrote in message
news:1B4C8834-16CA-4B43-B691-9F385F3C437C@.microsoft.com...
> Hi
> I wrote a Delphi program to create a dll.after that, I added an extended
> procedure to sql server using this dll. unfortunately this extended
> procedure
> is too slow ( for excution on a table with 100000 rows, it takes 1 minute
> to
> finish the extended procedure) . I recognized that the lack of speed
> arises
> from communication between sql and delphi. writing this procedure by sql
> led
> to worse performance.
> what should I do to speed up the extended procedure?
> Thanks.
>
What does the extended proc do? I'm guessing you are calling the proc or
some other code once for each row. If I'm right then I don't think it will
scale well. Try to implement the same logic as set-based code using TSQL,
then call the TSQL proc from your Delphi code.
David Portas
SQL Server MVP
--

Wednesday, March 7, 2012

Expression Data Type Conversion

I am getting the following error in my report. I am tring to program the BackgroungColor Expression so the if the value is null display a blue color else leave it white.

Conversion from string "" to type 'Date' is not valid

Here is my code sample:

=Iif(Fields!ReturnTime.Value = "", "AliceBlue", "White")

Hi RayClark,

You cannot compare a string with a date.
You can do this in several ways here is one:

=IIF(Len(Fields!ReturnTime.Value)=0, "AliceBlue", "White")

Use the length function to check the length of return time. If it is 0 set it to alice blue else set it to white :).

http://jhermiz.googlepages.com|||Thanks that worked great!!!

expression builder switch()

Via the Expression Builder, I'm using the switch() program flow function to handle my data. I can't seem to figure out how to do the "else" or "default" part of it. Anyone have a clue? Ex:

Switch(
Fields!test.value = 1, "One",
Fields!test.value = 2, "Two",
Fields!test.value = 3, "Three",
)

But what if Fields!test.value is not either 1,2, or 3, how would you set the "else" or "default" part within the switch statement?

Add a condition at the end which always evaluates to true.

Switch(
Fields!test.value = 1, "One",
Fields!test.value = 2, "Two",
Fields!test.value = 3, "Three",
1=1, "Default"
)

Express, Can I really redistribute this with our app?

SQL 2005 Express, Can I really redistribute this with our app?
Background: We sell a software program to Fortune 1000, always previously
required clients to use or obtain at least SQL 2000 Standard, always a
tedious process on their end, ie budgets, licensing, IT folks, etc.
Our typical client site has about 10 users who use our program, and the SQL
DB on some nearby host server.
Our DB requirements fit Express such as size < 4GB and Ram < 1GB. We don't
do anything too fancy with the DB, about 70 tables, 70 triggers, 140 stored
procedures. We use an embedded ID & PW passed by application, so SQL Login
has to be in there, but we can probably be flexible here.
Is SQL Express really a deployable solution for us? I assume that we can
script stuff like DB creation along with Tables and other needed objects,
allowing a typcial small group of users to get up and running quickly.
Can the DB host be an XP o/s in this scenerio? Do we need Management
Studio Express ?
From what I've read up at ms.com, all of this seems possible, I just can't
believe it would be this easy.
Any and all comments will be greatly appreciated."John" <John@.discussions.microsoft.com> wrote in message
news:936531F0-26FF-432E-A783-AD8264CE486A@.microsoft.com...
> SQL 2005 Express, Can I really redistribute this with our app?
> Background: We sell a software program to Fortune 1000, always previously
> required clients to use or obtain at least SQL 2000 Standard, always a
> tedious process on their end, ie budgets, licensing, IT folks, etc.
> Our typical client site has about 10 users who use our program, and the
> SQL
> DB on some nearby host server.
> Our DB requirements fit Express such as size < 4GB and Ram < 1GB. We
> don't
> do anything too fancy with the DB, about 70 tables, 70 triggers, 140
> stored
> procedures. We use an embedded ID & PW passed by application, so SQL
> Login
> has to be in there, but we can probably be flexible here.
> Is SQL Express really a deployable solution for us? I assume that we can
> script stuff like DB creation along with Tables and other needed objects,
> allowing a typcial small group of users to get up and running quickly.
> Can the DB host be an XP o/s in this scenerio? Do we need Management
> Studio Express ?
> From what I've read up at ms.com, all of this seems possible, I just can't
> believe it would be this easy.
> Any and all comments will be greatly appreciated.
>
Yep, it's that easy. You need to register for redistribution rights
(http://www.microsoft.com/sql/editions/express/redistregister.mspx).
Of course your customers might want to deploy your app on a higher SKU of
SQL Server, and they can always upgrade later.
David|||Thanks David for confirming its that easy.
How about the Windows XP host PC? Is that OK with say about 10 users
accessing data?
And Management Studio Express ? Is a gold release out yet or still CTP?
I'm figuring we'd need to use this for deployment or at least make it
available for clients just in case.
Again, your comments are valuable and appreciated!
John|||"John" <John@.discussions.microsoft.com> wrote in message
news:08D225AB-CB1E-44E4-BF80-D831FA3D57F8@.microsoft.com...
> Thanks David for confirming its that easy.
> How about the Windows XP host PC? Is that OK with say about 10 users
> accessing data?
It will install fine, but SQL Server is a server product, and you should
really run it on a server OS. Even though you don't have to pay a lot for
it you should take the deployment decisions seriously. Especially with
Fortune 1000 customers, their XP desktops are probably managed in a way that
makes them unsuitable for running a server product. Run Windows 2003
Server.
> And Management Studio Express ? Is a gold release out yet or still CTP?
> I'm figuring we'd need to use this for deployment or at least make it
> available for clients just in case.
For development get your staff MSDN or SQL Server Developer Edition. This
will give you full access to all the tools. You can use Management Studio
Express manage your deployed instances.
David

Express, Can I really redistribute this with our app?

SQL 2005 Express, Can I really redistribute this with our app?
Background: We sell a software program to Fortune 1000, always previously
required clients to use or obtain at least SQL 2000 Standard, always a
tedious process on their end, ie budgets, licensing, IT folks, etc.
Our typical client site has about 10 users who use our program, and the SQL
DB on some nearby host server.
Our DB requirements fit Express such as size < 4GB and Ram < 1GB. We don't
do anything too fancy with the DB, about 70 tables, 70 triggers, 140 stored
procedures. We use an embedded ID & PW passed by application, so SQL Login
has to be in there, but we can probably be flexible here.
Is SQL Express really a deployable solution for us? I assume that we can
script stuff like DB creation along with Tables and other needed objects,
allowing a typcial small group of users to get up and running quickly.
Can the DB host be an XP o/s in this scenerio? Do we need Management
Studio Express ?
From what I've read up at ms.com, all of this seems possible, I just can't
believe it would be this easy.
Any and all comments will be greatly appreciated.
"John" <John@.discussions.microsoft.com> wrote in message
news:936531F0-26FF-432E-A783-AD8264CE486A@.microsoft.com...
> SQL 2005 Express, Can I really redistribute this with our app?
> Background: We sell a software program to Fortune 1000, always previously
> required clients to use or obtain at least SQL 2000 Standard, always a
> tedious process on their end, ie budgets, licensing, IT folks, etc.
> Our typical client site has about 10 users who use our program, and the
> SQL
> DB on some nearby host server.
> Our DB requirements fit Express such as size < 4GB and Ram < 1GB. We
> don't
> do anything too fancy with the DB, about 70 tables, 70 triggers, 140
> stored
> procedures. We use an embedded ID & PW passed by application, so SQL
> Login
> has to be in there, but we can probably be flexible here.
> Is SQL Express really a deployable solution for us? I assume that we can
> script stuff like DB creation along with Tables and other needed objects,
> allowing a typcial small group of users to get up and running quickly.
> Can the DB host be an XP o/s in this scenerio? Do we need Management
> Studio Express ?
> From what I've read up at ms.com, all of this seems possible, I just can't
> believe it would be this easy.
> Any and all comments will be greatly appreciated.
>
Yep, it's that easy. You need to register for redistribution rights
(http://www.microsoft.com/sql/edition...tregister.mspx).
Of course your customers might want to deploy your app on a higher SKU of
SQL Server, and they can always upgrade later.
David
|||Thanks David for confirming its that easy.
How about the Windows XP host PC? Is that OK with say about 10 users
accessing data?
And Management Studio Express ? Is a gold release out yet or still CTP?
I'm figuring we'd need to use this for deployment or at least make it
available for clients just in case.
Again, your comments are valuable and appreciated!
John
|||"John" <John@.discussions.microsoft.com> wrote in message
news:08D225AB-CB1E-44E4-BF80-D831FA3D57F8@.microsoft.com...
> Thanks David for confirming its that easy.
> How about the Windows XP host PC? Is that OK with say about 10 users
> accessing data?
It will install fine, but SQL Server is a server product, and you should
really run it on a server OS. Even though you don't have to pay a lot for
it you should take the deployment decisions seriously. Especially with
Fortune 1000 customers, their XP desktops are probably managed in a way that
makes them unsuitable for running a server product. Run Windows 2003
Server.

> And Management Studio Express ? Is a gold release out yet or still CTP?
> I'm figuring we'd need to use this for deployment or at least make it
> available for clients just in case.
For development get your staff MSDN or SQL Server Developer Edition. This
will give you full access to all the tools. You can use Management Studio
Express manage your deployed instances.
David

Express, Can I really redistribute this with our app?

SQL 2005 Express, Can I really redistribute this with our app?
Background: We sell a software program to Fortune 1000, always previously
required clients to use or obtain at least SQL 2000 Standard, always a
tedious process on their end, ie budgets, licensing, IT folks, etc.
Our typical client site has about 10 users who use our program, and the SQL
DB on some nearby host server.
Our DB requirements fit Express such as size < 4GB and Ram < 1GB. We don't
do anything too fancy with the DB, about 70 tables, 70 triggers, 140 stored
procedures. We use an embedded ID & PW passed by application, so SQL Login
has to be in there, but we can probably be flexible here.
Is SQL Express really a deployable solution for us? I assume that we can
script stuff like DB creation along with Tables and other needed objects,
allowing a typcial small group of users to get up and running quickly.
Can the DB host be an XP o/s in this scenerio? Do we need Management
Studio Express ?
From what I've read up at ms.com, all of this seems possible, I just can't
believe it would be this easy.
Any and all comments will be greatly appreciated."John" <John@.discussions.microsoft.com> wrote in message
news:936531F0-26FF-432E-A783-AD8264CE486A@.microsoft.com...
> SQL 2005 Express, Can I really redistribute this with our app?
> Background: We sell a software program to Fortune 1000, always previously
> required clients to use or obtain at least SQL 2000 Standard, always a
> tedious process on their end, ie budgets, licensing, IT folks, etc.
> Our typical client site has about 10 users who use our program, and the
> SQL
> DB on some nearby host server.
> Our DB requirements fit Express such as size < 4GB and Ram < 1GB. We
> don't
> do anything too fancy with the DB, about 70 tables, 70 triggers, 140
> stored
> procedures. We use an embedded ID & PW passed by application, so SQL
> Login
> has to be in there, but we can probably be flexible here.
> Is SQL Express really a deployable solution for us? I assume that we can
> script stuff like DB creation along with Tables and other needed objects,
> allowing a typcial small group of users to get up and running quickly.
> Can the DB host be an XP o/s in this scenerio? Do we need Management
> Studio Express ?
> From what I've read up at ms.com, all of this seems possible, I just can't
> believe it would be this easy.
> Any and all comments will be greatly appreciated.
>
Yep, it's that easy. You need to register for redistribution rights
(http://www.microsoft.com/sql/editio...stregister.mspx).
Of course your customers might want to deploy your app on a higher SKU of
SQL Server, and they can always upgrade later.
David|||Thanks David for confirming its that easy.
How about the Windows XP host PC? Is that OK with say about 10 users
accessing data?
And Management Studio Express ? Is a gold release out yet or still CTP?
I'm figuring we'd need to use this for deployment or at least make it
available for clients just in case.
Again, your comments are valuable and appreciated!
John|||"John" <John@.discussions.microsoft.com> wrote in message
news:08D225AB-CB1E-44E4-BF80-D831FA3D57F8@.microsoft.com...
> Thanks David for confirming its that easy.
> How about the Windows XP host PC? Is that OK with say about 10 users
> accessing data?
It will install fine, but SQL Server is a server product, and you should
really run it on a server OS. Even though you don't have to pay a lot for
it you should take the deployment decisions seriously. Especially with
Fortune 1000 customers, their XP desktops are probably managed in a way that
makes them unsuitable for running a server product. Run Windows 2003
Server.

> And Management Studio Express ? Is a gold release out yet or still CTP?
> I'm figuring we'd need to use this for deployment or at least make it
> available for clients just in case.
For development get your staff MSDN or SQL Server Developer Edition. This
will give you full access to all the tools. You can use Management Studio
Express manage your deployed instances.
David

Sunday, February 26, 2012

express to enterprise edition

Hi All

I have sql 2005 express on my Dev machine but am planning on using a full sql 2005 database where i deploy my program and i have 2 questins please

1. Will my sql express database work with the full version of SQL 2005 or do i import it or something ( DB will get bigger than sql express max at some point)and

2. I was intending using stored procedures, can these also be easily be used/ transfered on am SQL 2005 database

thanks

Gibbo

hi Gibbo,

gibbo1715 wrote:

I have sql 2005 express on my Dev machine but am planning on using a full sql 2005 database where i deploy my program and i have 2 questins please

1. Will my sql express database work with the full version of SQL 2005 or do i import it or something ( DB will get bigger than sql express max at some point)and

yes.. SQLExpress is, somehow, a "subset" of the "full" SQL Server editions, so anything that works on Express works on the full editions as well but User Instances, that are supported on SQLExpress only..

2. I was intending using stored procedures, can these also be easily be used/ transfered on am SQL 2005 database

yes, no problem at all as, again, all the internal structures of database files are the same..

regards

Express remote connection on a LAN help

I have recently installed SQL Server Express on a desktop machine for a program that we use. I am in need of adding additional machines to gain access to the server for the database. Right now, the program is working on the local machine fine. What do I need to do or enable for access on a local LAN? All machines are XP Pro on a workgroup. Also, the software we use has a remote connection manager that requires inputting the server address for the machine. Is it better to use the computer name or IP address, and then what is that format? SQL Instance name is 'uesafh' if that helps. Any other information that I can provide, please let me know.

Thanks!

"What do I need to do or enable for access on a local LAN?"

enable remote connections first, launch Sql Surface Area Config tool (comes with Express) and select the connections and services link. you will then see a Remote Connections setting, set it to enabled.

"Is it better to use the computer name or IP address, and then what is that format?"

either is fine, though I find the probabilty of renaming a server is higher than assigning it a new IP, so I generally will use IP.

TCP/IP protocol connection format: ServerName or IP[\NamedInstance][,Port# (defaults to 1433)]

if you intend on using tcp/ip just ensure it is enabled and part of the protocol rotation in Sql Config Mgr. (another tool that ships with Express)

|||Ok, thanks for the help so far.

So for the server name to connect to on the remote systems in the LAN, would the format be:

'\\192.168.0.30\uesafh' ? I had tried that before and it would connect, however the connection would drop after a couple of logins and then would not be restored by even rebooting when attempting to login.

The program we use allows for multiple users to log into it, using their own login for the program that is kept and verified in the db. Should I use a 'sa' login with a password as part of the remote connection instead of Windows Authentication?|||

192.168.0.30\uesafh (this is the correct format assuming its listening on 1433)

you should be able to use either but be aware that windows authentication is using your currently logged on account so you should be in the same domain/workgroup and have assigned access. If you are just testing it you may want to use sql authentication as opposed to windows, but i believe in sql 2005 sql authentication is also of by default.

|||Ok, thanks for the help so far. I have been reading however, that I need to install SQL express on each client computer? Is that right? Is there any necessary software installs that I need to make these connections work? I was wondering particularly about .NET 2.0, MSXML 6.0, or do I need anything to get the connection to work? I have also read that I needed to install the 213 m.b. SQL server express toolkit?

Thanks again for the help!|||

http://msdn.microsoft.com/vstudio/express/sql/download/

SQL Server Management Studio Express

SQL Server Management Studio Express is installed by running the setup program for either SQL Server Express with Advanced Services or SQL Server Express Toolkit. Before you install SQL Server Management Studio Express, you must install MSXML 6.0.

thats all you need