Showing posts with label users. Show all posts
Showing posts with label users. Show all posts

Wednesday, March 28, 2012

Saving pictures

Is it better to have users that upload pictures have them saved to SQL server or to a folder? I have a site where users enter things that they own (and each item has a unique id) and now I would like to add the functionality to add a picture. I am sure I should use the fileUpload control, but should this save to a folder created for each user or to the SQL record itself? Or possibly a separate SQL table just for pictures?

Thanks for the help.

Images are stored as BLOB data in SQL Server. So if you want to save the pictures in SQL Server, just send the pics as byte arrays to SQL Server, you can find a lot of examples on the internet. And here is a discussion about to BLOB or not, in this post:

http://forums.asp.net/1357936/ShowPost.aspx

Saving Parameter's Values

Hi,
I have a report with some parameters. Can the values users enter for those
parameters for a given report run be saved in a Database?
Basically we would like parameters to always default to the last values a
user selected the last time he/she ran a report.
Is this supported out of the box? Any ideas on how this can be achieved?
ThanksHello Christians,
Based on my scope, this feature is not supported at present. To work around
this issue, you may want to implement your own report viewer and manage
parameter in session by your self. You may want to refer to the following
link for some reference
http://www.codeproject.com/aspnet/SQLRSViewer.asp
Hope this is helpful.
Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
>Thread-Topic: Saving Parameter's Values
>thread-index: AcXU98RsnhvZYJ8GSCyqm1Rk/oJ1nA==>X-WBNR-Posting-Host: 66.225.146.61
>From: "=?Utf-8?B?Q2hyaXN0aWFucyBJenF1aWVyZG8=?="
<christians@.newsgroups.nospam>
>Subject: Saving Parameter's Values
>Date: Wed, 19 Oct 2005 14:55:06 -0700
>Lines: 11
>Message-ID: <D65100A1-CEAD-4DB8-83E9-7C6D4B831EA9@.microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.sqlserver.reportingsvcs
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:54661
>X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
>Hi,
>I have a report with some parameters. Can the values users enter for those
>parameters for a given report run be saved in a Database?
>Basically we would like parameters to always default to the last values a
>user selected the last time he/she ran a report.
>Is this supported out of the box? Any ideas on how this can be achieved?
>Thanks
>

Saving ODBC password

I have an app that uses ODBC for connection. Everytime the users log in it prompts the user to enter a password.

Is there any way (reg key entery ?) for the password to be saved so the user is not prompted?

Thanks

MPM

No, I'm sorry you can't do that. This is a security issue, since someone may gain access to your registry information, and thereby uncover your password. Even if you modified your registry information to store the password ODBC would not read that information.

I can't think of a work-around, unless you had a VB script or something that automatically logged on to a database? Perhaps you could use trusted connection instead of UserID/Password connection?

Hope this helps.

~Warren

|||There is no way to save the ODBC password in the registery. But you can do somethings to avoid this.

1. If you have a logon screen in your app. You can use the same password to get access to your app and to get access to your DB. If you do that you can just store the user/pass used to get access to the app and use it for the ODBC.
2. You can use trusted connection if you are using a Domain Controller, this is the easiest way.
3. You can code a box that opens instead of the default ODBC password request box and store the password in a MDB file.

Here's my suggestions.

Regards

JBsql

Saving ODBC password

I have an app that uses ODBC for connection. Everytime the users log in it prompts the user to enter a password.

Is there any way (reg key entery ?) for the password to be saved so the user is not prompted?

Thanks

MPM

No, I'm sorry you can't do that. This is a security issue, since someone may gain access to your registry information, and thereby uncover your password. Even if you modified your registry information to store the password ODBC would not read that information.

I can't think of a work-around, unless you had a VB script or something that automatically logged on to a database? Perhaps you could use trusted connection instead of UserID/Password connection?

Hope this helps.

~Warren

|||There is no way to save the ODBC password in the registery. But you can do somethings to avoid this.

1. If you have a logon screen in your app. You can use the same password to get access to your app and to get access to your DB. If you do that you can just store the user/pass used to get access to the app and use it for the ODBC.
2. You can use trusted connection if you are using a Domain Controller, this is the easiest way.
3. You can code a box that opens instead of the default ODBC password request box and store the password in a MDB file.

Here's my suggestions.

Regards

JB

Friday, March 23, 2012

saving data to a database file via simple form

Hi,

I am designing a site using Visual Web Developer, CSharp and Sql server Express.

One the contact page I want to put a form that allows users to enter details about

themselves. On clicking the button this will be stored in the database under a table

called subscribers. The form will have, name, address, telephone, email fields etc.

With the email addresses from the visitors I want to be able to keep them in

a newsletter section or similar which is automated so they recevie emails from time to time

Could somebody suggest a tutorial which shows how to complete this process

using c sharp and sql.

Thanks for you time

Prontonet

Hi prontonet

These may be helpful

http://www.asp.net/learn/videos/video-46.aspx

http://www.codeproject.com/useritems/ASPNET_Contact_us_page.asp

Regards

ScottyB

|||

thank you. I will have a look.

Saving and manipulating XML data

Hi,
I am developing a HR type application and need some help trying to decide
what is best for the following situation.
I need to allow users to enter resume data in a web page. Once they have
entered all the data I would like to save it to a SQL Server database.
Here's the trick. I need to be able to retrieve the data from the database
and then manipulate it and allow the user to choose different resume styles
they would like to see the data displayed in. I also need to be able to
accept and provide (from or to an external source) this resume data in a
format that conforms to the HR-XML (www.hr-xml.org) standard.
So I figured I would build an interface that could take an xml file that is
HR-XML compliant and save the data to the database or vice versa. Then when
the user enters the data for their resume this data would be compiled into an
HR-XML compliant XML file and fed through the interface. If I was accepting
a file from an external source then that file would also be fed through the
same interface.
Does this make sense? I'm not new to XML, but I really haven't done much in
it yet, so I'm not sure if this is the best approach or not. Please feel
free to ask any questions you might need for clarification.
Thanks,
Wes
Hello, Wes!
You wrote on Tue, 19 Oct 2004 07:41:11 -0700:
W> I am developing a HR type application and need some help trying to
W> decide what is best for the following situation.
W> I need to allow users to enter resume data in a web page. Once they
W> have entered all the data I would like to save it to a SQL Server
W> database. Here's the trick. I need to be able to retrieve the data
W> from the database and then manipulate it and allow the user to choose
W> different resume styles they would like to see the data displayed in. I
W> also need to be able to accept and provide (from or to an external
W> source) this resume data in a format that conforms to the HR-XML
W> (www.hr-xml.org) standard.
You can produce xml document in the following manner
a) load all data from server to local recordset or dataset (ado.net) and
create xml manually, for example via XmlWriter
b) write complex and nontrivial "for xml explicit" query. In that case xml
document will be generated on the server without your intervention.
When you get xml document you will be able to apply different styles for
resume using xslt and css.
W> So I figured I would build an interface that could take an xml file that
W> is HR-XML compliant and save the data to the database or vice versa.
You can use annotated xml schema (AXD) to automaticaly map xml document to
relational schema.
W> Then when the user enters the data for their resume this data would be
W> compiled into an HR-XML compliant XML file and fed through the
W> interface.
It is good architectural decision to provide one way for incoming data to be
in database.
W> If I was accepting a file from an external source then that file would
W> also be fed through the same interface.
W> Does this make sense? I'm not new to XML, but I really haven't done
W> much in it yet, so I'm not sure if this is the best approach or not.
W> Please feel free to ask any questions you might need for clarification.
W> Thanks,
With best regards, Alex Shirshov.

Tuesday, March 20, 2012

Save some Stored proc in file and create SP from file

Every day we are restoring prod DB in Development env. I need to save before restore users stored proc,

restore DB and after create SP from file.

Thanks.

use

sqlcmd or osql

|||The command-line tools may not be adequate because the defaults do not suffice if your definitions are larger than say 8000 characters. And it will be a pain to automate the scripting of multiple objects and so on. Best is to use SQL-DMO/SMO or DTS/SSIS tasks for this.

Monday, March 12, 2012

save photos

I have an asp.net 2.0 website that users will be uploading lots of photos. My question is where to save them? Should I save them in a table or create a folder on the web server and save them there?

My gut tells me to create a folder to save them in and have links to the folder/photos for each record the user creates. I will then need to display the photos in a report that is tied to another table which has the text values for the report.

Any suggestions??

Joe

I do both. I have a folder in my app as well as a table that contains the fileName.

protectedvoid addFileLinkButton_Click(object sender,EventArgs e)

{

if (addFileUpload.HasFile)

{

try

{

string fileName = addFileUpload.FileName;

string location = Server.MapPath("../../ItemFiles/") + fileName;

addFileUpload.SaveAs(location);

string fileDisplayName = fileDisplayNameTextBox.Text;

CatalogAccess.insertItemFile(itemID, fileDisplayName, isDefault, fileTypeID, fileName);Response.Redirect("~/Admin/Items/ViewItemFiles.aspx?ItemID=" + itemID);

}

catch

{

statusLabel.Visible =true;statusLabel.Text ="File Upload Failed!";

}

}

}

Save Enterprise Manager Registrations

I need to wack a users Windows profile, however he wants to save his Enterprise Manager registrations (not just exporting a list). I'm drawing a blank on how to do this. Quick help please?
These are in the registry.
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server\80\Tools\SQLEW\Registered Servers X\
http://www.aspfaq.com/
(Reverse address to reply.)
"JDArsenault" <JDArsenault@.discussions.microsoft.com> wrote in message
news:1C661510-8F13-4F05-BC97-FFF45A0A83FE@.microsoft.com...
> I need to wack a users Windows profile, however he wants to save his
Enterprise Manager registrations (not just exporting a list). I'm drawing a
blank on how to do this. Quick help please?
|||That was it! Thank you for the quick help.
"Aaron [SQL Server MVP]" wrote:

> These are in the registry.
> HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
> Server\80\Tools\SQLEW\Registered Servers X\
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "JDArsenault" <JDArsenault@.discussions.microsoft.com> wrote in message
> news:1C661510-8F13-4F05-BC97-FFF45A0A83FE@.microsoft.com...
> Enterprise Manager registrations (not just exporting a list). I'm drawing a
> blank on how to do this. Quick help please?
>
>

Save Enterprise Manager Registrations

I need to wack a users Windows profile, however he wants to save his Enterprise Manager registrations (not just exporting a list). I'm drawing a blank on how to do this. Quick help please?These are in the registry.
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server\80\Tools\SQLEW\Registered Servers X\
--
http://www.aspfaq.com/
(Reverse address to reply.)
"JDArsenault" <JDArsenault@.discussions.microsoft.com> wrote in message
news:1C661510-8F13-4F05-BC97-FFF45A0A83FE@.microsoft.com...
> I need to wack a users Windows profile, however he wants to save his
Enterprise Manager registrations (not just exporting a list). I'm drawing a
blank on how to do this. Quick help please?

Save Enterprise Manager Registrations

I need to wack a users Windows profile, however he wants to save his Enterpr
ise Manager registrations (not just exporting a list). I'm drawing a blank o
n how to do this. Quick help please?These are in the registry.
HKEY_CURRENT_USER\Software\Microsoft\Mic
rosoft SQL
Server\80\Tools\SQLEW\Registered Servers X\
http://www.aspfaq.com/
(Reverse address to reply.)
"JDArsenault" <JDArsenault@.discussions.microsoft.com> wrote in message
news:1C661510-8F13-4F05-BC97-FFF45A0A83FE@.microsoft.com...
> I need to wack a users Windows profile, however he wants to save his
Enterprise Manager registrations (not just exporting a list). I'm drawing a
blank on how to do this. Quick help please?|||That was it! Thank you for the quick help.
"Aaron [SQL Server MVP]" wrote:

> These are in the registry.
> HKEY_CURRENT_USER\Software\Microsoft\Mic
rosoft SQL
> Server\80\Tools\SQLEW\Registered Servers X\
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> "JDArsenault" <JDArsenault@.discussions.microsoft.com> wrote in message
> news:1C661510-8F13-4F05-BC97-FFF45A0A83FE@.microsoft.com...
> Enterprise Manager registrations (not just exporting a list). I'm drawing
a
> blank on how to do this. Quick help please?
>
>

Friday, March 9, 2012

Save $$$ on licensing?

SQL Server Developer edition does NOT have any limitations on connections,
users, or number of processors or CALS, correct? As long the database is no
t
used in a production environment.
Our mgmt has recently is ordering only ordering 1 Developer Edition license
for each new SQL database server we are installing. We have 15 servers on
order and each is a dual processor. This represents a huge cost savings of
not having to purchase per processor licenses as we had done in the past to
accomodate our users acceptance testing -- from thousands of dollars for eac
h
processor to less than $49 for each server.Would that really save you thousands even though you still buy the full
licences once you go live? I guess if you have a continuing UAT requirement
you will save something in the longer term. A worthy reminder about Dev
Edition anyway :-)
David Portas
SQL Server MVP
--

Save $$$ on licensing?

SQL Server Developer edition does NOT have any limitations on connections,
users, or number of processors or CALS, correct? As long the database is not
used in a production environment.
Our mgmt has recently is ordering only ordering 1 Developer Edition license
for each new SQL database server we are installing. We have 15 servers on
order and each is a dual processor. This represents a huge cost savings of
not having to purchase per processor licenses as we had done in the past to
accomodate our users acceptance testing -- from thousands of dollars for each
processor to less than $49 for each server.Would that really save you thousands even though you still buy the full
licences once you go live? I guess if you have a continuing UAT requirement
you will save something in the longer term. A worthy reminder about Dev
Edition anyway :-)
--
David Portas
SQL Server MVP
--

Save $$$ on licensing?

SQL Server Developer edition does NOT have any limitations on connections,
users, or number of processors or CALS, correct? As long the database is not
used in a production environment.
Our mgmt has recently is ordering only ordering 1 Developer Edition license
for each new SQL database server we are installing. We have 15 servers on
order and each is a dual processor. This represents a huge cost savings of
not having to purchase per processor licenses as we had done in the past to
accomodate our users acceptance testing -- from thousands of dollars for each
processor to less than $49 for each server.
Would that really save you thousands even though you still buy the full
licences once you go live? I guess if you have a continuing UAT requirement
you will save something in the longer term. A worthy reminder about Dev
Edition anyway :-)
David Portas
SQL Server MVP

Wednesday, March 7, 2012

SAN: tempdb and log files not isolated from others files

HI,
SQL Server 7.0 on NT 4 (clustered)
- 3 DB totaling 7 + 2 + 1 = 10 GIG
- 100 users
- Jobs that insert many (1000 - 5000) rows in databases are executed during
office hour.
Our technical staff want to install our databases on a new Compaq SAN in
this way --> One big array containg 36 disk drives.
They told me that they can create "logical volume" for RAID 1 and RAID5 but
"tempdb" and "log files" are not going to be isolated on a small group on
disk. Data files, log files, tempdb and others files are all going to be
striped on the big array of 36 disks. In others word, we can have 1 piece of
tempdb, 1 piece on log, 1 piece of data file, 1 piece of a .bak file etc...
on the same disk.
With this scenario, is it possible to encounter bad performace ?
Thank you
dannyIt's really hard to say without actually testing it on the hardware you
mentioned and under the max load. It doesn't sound like you have that many
transactions but it really depends on how well the schema was designed, how
you actual use the data, how many and what type of transactions, how much
cache in the SAN etc, etc. 36 Drives will help to reduce head contention
and it will probably be OK but noone can say for sure without much more
intimate knowledge of the above mentioned.
--
Andrew J. Kelly
SQL Server MVP
"Danny Presse" <dpresse@.congresmtl.com> wrote in message
news:%23b3fs0hVDHA.1832@.TK2MSFTNGP09.phx.gbl...
> HI,
> SQL Server 7.0 on NT 4 (clustered)
> - 3 DB totaling 7 + 2 + 1 = 10 GIG
> - 100 users
> - Jobs that insert many (1000 - 5000) rows in databases are executed
during
> office hour.
> Our technical staff want to install our databases on a new Compaq SAN in
> this way --> One big array containg 36 disk drives.
> They told me that they can create "logical volume" for RAID 1 and RAID5
but
> "tempdb" and "log files" are not going to be isolated on a small group on
> disk. Data files, log files, tempdb and others files are all going to be
> striped on the big array of 36 disks. In others word, we can have 1 piece
of
> tempdb, 1 piece on log, 1 piece of data file, 1 piece of a .bak file
etc...
> on the same disk.
> With this scenario, is it possible to encounter bad performace ?
> Thank you
> danny
>