Tuesday, March 27, 2012
Filling a select box ...
I can collect the field data but I want to fill the select drop-down on page load.
Thanks!!Start an HTML FORM. Build an OPTION item for each row in the recordset. Iterate through the recordset, adding additional OPTION items for each row. Then at .EOF, close the connection and finish off the FORM.|||That was what I needed!sql
Wednesday, March 7, 2012
File system rights
I have setup a test IIS box and would like to use that as my development platform. I have installed sql express 2005 for my database on the box as well.
I can setup new pages on the file server just fine.. But when I try and setup a login page and use the asp.net configuration web page to setup security which create a user DB it will not let me create it...
I get the following:
The following message may help in diagnosing the problem:An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 5110 and the SqlException message is: The file "J:\INETPUB\NBSRECAP\APP_DATA\ASPNETDB_TMP.MDF" is on a network path that is not supported for database files. CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Creating the ASPNETDB_4a9331c5903148ca92e3ffbee7d29976 database...
Can someone let me know.
Are you trying to create a database on a network path? This is not supported by default, however you can open a trace flag to allow this:dbcc traceon(1807,-1)
go
create database testUNC on (name='testUNC_data',
filename='\\iori\xxx\testUNC.mdf')
log on (name='testUNC_log',
filename='\\iori\xxx\testUNC.ldf')
Sunday, February 19, 2012
File growth problem in 2005
Have a database, one filegroup with one datafile and one log file.
However, restarted the box and saw that the growth settings for the datafile was changed from 100Mb increments to 25600%. The logfile is still the same at 200Mb as required. Both have unlimited growth.
Looking at sysfiles in the database, growth is 25600 for the log and data file. In Management Studio I cannot change the setting for the data file (log file still shows 200Mb growth increments), Studio tells me "Value 25600 is not valid for Value. Value should be between Minimum and Maximum.
Any thoughts? Cant really have a database sitting with this growth rate, and cannot change the value in sysfiles either (even with sp_configure etc).
Any ideas? Thanks
Have you tried clicking on the button next to the text that describes the growth. This provides the means to change the growth settings. The button has ellipse on it ...|||Seems to be a GUI problem. Try changing the autogrow value using ALTER DATABASE instead.--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
news:19115900-bfb9-4dff-8042-9b7462a44781@.discussions.microsoft.com... > Have a database, one filegroup with one datafile and one log file. > > However, restarted the box and saw that the growth settings for the > datafile was changed from 100Mb increments to 25600%. The logfile is > still the same at 200Mb as required. Both have unlimited growth. > > Looking at sysfiles in the database, growth is 25600 for the log and > data file. In Management Studio I cannot change the setting for the data > file (log file still shows 200Mb growth increments), Studio tells me > "Value 25600 is not valid for Value. Value should be between Minimum and > Maximum. > > Any thoughts? Cant really have a database sitting with this growth rate, > and cannot change the value in sysfiles either (even with sp_configure > etc). > > Any ideas? Thanks > >||| yeah, it's a GUI problem preventing me to change that value (I got that error from clicking the ... button to change it). My other worry is what changed this, the system was set to grow in increments of 100Mb, settings omething to 25600% increase (when you cant even get to that value in the GUI) means something on the server changed ther settings. Further to this see http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=127177 a) it only seems to affect databases upgraded from SQL 2000 b) it only manifests after the SQL server has been restarted c) It has not been fixed in SP1 so here's hoping for SP2. The only workaround I have so far is to set Max size of the file to prevent the file from growing too large, or to turn off AutoGrow
File growth problem in 2005
Have a database, one filegroup with one datafile and one log file.
However, restarted the box and saw that the growth settings for the datafile was changed from 100Mb increments to 25600%. The logfile is still the same at 200Mb as required. Both have unlimited growth.
Looking at sysfiles in the database, growth is 25600 for the log and data file. In Management Studio I cannot change the setting for the data file (log file still shows 200Mb growth increments), Studio tells me "Value 25600 is not valid for Value. Value should be between Minimum and Maximum.
Any thoughts? Cant really have a database sitting with this growth rate, and cannot change the value in sysfiles either (even with sp_configure etc).
Any ideas? Thanks
Have you tried clicking on the button next to the text that describes the growth. This provides the means to change the growth settings. The button has ellipse on it ...|||Seems to be a GUI problem. Try changing the autogrow value using ALTER DATABASE instead. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ Blog: http://solidqualitylearning.com/blogs/tibor/> Have a database, one filegroup with one datafile and one log file. >
> However, restarted the box and saw that the growth settings for the
> datafile was changed from 100Mb increments to 25600%. The logfile is
> still the same at 200Mb as required. Both have unlimited growth. >
> Looking at sysfiles in the database, growth is 25600 for the log and
> data file. In Management Studio I cannot change the setting for the data
> file (log file still shows 200Mb growth increments), Studio tells me
> "Value 25600 is not valid for Value. Value should be between Minimum and
> Maximum. >
> Any thoughts? Cant really have a database sitting with this growth rate,
> and cannot change the value in sysfiles either (even with sp_configure
> etc). >
> Any ideas? Thanks >
>|||
yeah, it's a GUI problem preventing me to change that value (I got that error from clicking the ... button to change it).
My other worry is what changed this, the system was set to grow in increments of 100Mb, settings omething to 25600% increase (when you cant even get to that value in the GUI) means something on the server changed ther settings.
|||This seems to be a bug on the SQL engine. I've had it happen twice now. First time I assumed I had done something wrong, reset the autogrow values to a number. This morning it has happened again and the server has no disk space left. 100% sql engine bug I think.|||Further to this see http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=127177
a) it only seems to affect databases upgraded from SQL 2000
b) it only manifests after the SQL server has been restarted
c) It has not been fixed in SP1 so here's hoping for SP2.
The only workaround I have so far is to set Max size of the file to prevent the file from growing too large, or to turn off AutoGrow