Showing posts with label attached. Show all posts
Showing posts with label attached. Show all posts

Monday, March 26, 2012

Read only database

hi

I'm having a problem while attaching the database to the server through server management studio. The database is getting attached as read only database.

But when i'm attaching it through command prompt or using a batch file it is getting attached properly

Can any one suggest the rason and a reamedy for avoiding this problem

Where does this database come from?|||The database is from another system/ computer. It is behaving the same on that computer also|||

Databases can be marked as read-only. You should check the other system to see if the database was marked that way. Check the database proprties, Options page under State (in 2005, not sure where this is in 2000). The read-only flag travels with the database, you'll need to un-set it at the source before moving the database.

Mike

sql

Friday, March 23, 2012

Read datasource value, send to textbox in VB script

I want to read a value from a datasource and send it to a textbox on an ASP page from the page's attached VB file.

Both the textbox and datasource exist, but I don't know the proper commands to get the datasource value and then set the textbox value to it.

Dim Text As TextBox = FormView0.FindControl("Header")

Dim SQL As String = "Select [Customer] From [Datasource]"

Datasource.SelectCommand = SQL

Oh yeah, I don't want the textbox control to be databound as shown:

Text

='<%# Eval("Customer") %>'

Hi phoenix,

ASP.NET provides many ways on Data Binding server controls. As you want to bind data to a textbox from your data table, we suggest that you should create a DataSet which contains the data talbe and filter which row and column would be selected, then evaluate the TextBox control's text property with the selected value.

Ofcause there are may other ways for you to refer, pls check these materials:

http://samples.gotdotnet.com/quickstart/aspplus/doc/webdatabinding.aspx (For Data Binding server controls)

http://samples.gotdotnet.com/quickstart/aspplus/doc/webserverctrls.aspx (For the introduction of server controls)

If this does not help you ,pls feel free to mark the post as Not Answered and reply. Thanks.