|
Hello all,
I'm continuing to write a fairly complex application. I have a fair amount of data that I would like to store with the application that will include a lot of lookup data that is both fairly relational and somewhat large (several megs in size). The lookup data will be regenerated periodically. If the amount of data were a little smaller (and a little less in need of strict enforcement of relationships), I'd probably just store it all in XML files. Because of this, I've opted to go with a database to store this data. In addition to the main client application, there are a couple of small apps that will be used to retrieve information to stuff into the database. The database would actually be read-only from the client app and would only be writable from the information gathering applications.
What I'd like to do is set up a database project and have it point to a local database file. I want to source control my scripts for the database and be able to quickly create a copy of the database on a different development machine. It would be even better if I could just move the database around as a file as part of my project. I basically want all the benefits of MSDE / SQL Express with the portability (in the sense of being able to move the files around) of Access.
What would you suggest?
|
|
|
|
|
Use MSDE/Sql Express and employ "detatch database" /"attach database" to copy the database around:
I.e. Detach the master copy of the database. copy the .mdf file (attach will create a new .ldf).
Copy the file to the new server, and on that server "attach" the database, editing the locations for the log and data files as needed. Re-attach the master to your development server and keep working.
The same technique can be used to distribute the final version.
|
|
|
|
|
Hi,
I got the SQL server 2005 Express installed but dunno how to import my data from the MDB files.
Wr do I look for this? Do they have it in on EX Ed?
Tnx
|
|
|
|
|
Good day everyone,
I need to do a Login system in ASP.Net using C#.Net as code behind page for my website.
I've got an Access database conntaining username and password.
Is there anyone know where can I find a sample project?
If you're interested in, pls help
Thanks so much.
eric
|
|
|
|
|
|
I'm having a problem getting my application to connect with an instance of MSDE over the network. I installed MSDE using the following parameters.
INSTANCENAME=MyInstance DISABLENETWORKPROTOCOLS=0 SAPWD=password SECURITYMODE=SQL
I have searched everywhere for an answer to my problem and I have followed all the solutions I can find with no luck. I have made sure the port numbers line up, I have enabled networking protocols, and turned off firewalls.
I can connect to SQL Server just fine over the same network but not to an instanse of MSDE.
SOMEONE HELP PLEASE!!!!!!!!!!!!
|
|
|
|
|
what connection string are you using ?
My second computer is your linux box.
|
|
|
|
|
I'm working on a web app written in vb.net. I recently added a column in the table 'clients'. I had to manually update the .xsd schema file. After doing that, modifying the client info via the web interface stopped working. To fix the problem, in the 'clients_modify' sproc I had to remove some of the where clause criteria (the where clause was previously written to match on all fields). The match on all fields is what is currently in production, and it works. Question - why did I have to remove comparison on 8 of the 25 fields in order for the update to work after the dataset modification?
|
|
|
|
|
NameNotTaken wrote: why did I have to remove comparison on 8 of the 25 fields in order for the update to work after the dataset modification?
Without knowing more about the structure of your database that may be difficult to answer.
A more pertinent question might be why are you trying to match on all these columns when matching on the primary key would do the same job?
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
I realize matching on the primary key is sufficient. I came into this app after it had been in production for over a year. This is just one of the many things I have to fix.
On a side note, I ran into a similar issue about a month ago. I updated a dataset and a corresponding sproc stopped working. I'm not sure if it's due to the poor initial design of the app or if it's a known issue in .net architecture. My original question was leaning towards the latter. Thanks for taking time to think about it.
- J
|
|
|
|
|
NameNotTaken wrote: I'm not sure if it's due to the poor initial design of the app or if it's a known issue in .net architecture. My original question was leaning towards the latter.
From what you've said I think that it is much more likely to be the "poor initial design" that is the problem.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Hi,
I want to retrive the data in the following tabular format..if any body knows the query or s.p,,, please let me know...
columnName|Datatype & Size|Index|Constraint Name|Constraint Type|Constraint |
| | | | | |
| | | | | |
Condition|Reference table/s.p/function|
| |
Thanks in advance....
Arif
|
|
|
|
|
|
Hi,
Thanks for giving reply...
But sp_help 'tablename' will show all the details of table
but i want that particular columns of data only in a single tabular format..
Thanks in advance..
|
|
|
|
|
Hope this helps
use northwind
select * from information_schema.Columns where table_name='region'
|
|
|
|
|
Hi Friends
I want a query which perform the following for me
i have one table with three fields (code,field1, field2)
i want to update field2 with the values of field one for 200 records based on teh criteira that
code =1 or code=2 or code = 3 ....code=200;
How can i do that please help me
Naveed Kamboh
|
|
|
|
|
I'm not sure I've understood the question correctly but...
update tablename
set field2 = code
where code between 1 and 200
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
hi,
is there any limit of columns in sql table, if in a table there r almost 800 columns then can it work properly ??? what is the capacity of an sql database??? i think it is some giga bytes but wats the exact value ???
|
|
|
|
|
|
:->hello friends!!
i am creating a database , a table into that database and appending a coumns to table.
code-->
Dim tbl As New Table, cat As New ADOX.Catalog
cat.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\TagInfo.mdb" & ";"
tbl.Name = "tblTagInfo"
For ii = 0 To TotalTags - 1
tbl.Columns.Append tagName(0), adVarWChar, 50
Next
cat.Tables.Append tbl
<--code
now i want to insert data to column
but i face the problem
how to insert a data of only first(or any but only one) column ?
The problem is----
The 'Required property' of a all columns are by defaul True
hence we can not insert only one record , we have to specify all column and respective value.
My problem is how to set 'Required Property' of column to False/No
Thanks in advace
Rahul here
|
|
|
|
|
Dear all,
how i can make backup for database in sql server 2000 using C#
and also how i can make restore for it after that
thanks
plz help me
A.shawky
|
|
|
|
|
ahmed shawky wrote: how i can make backup for database in sql server 2000 using C#
and also how i can make restore for it after that
Strictly speaking C# cannot do this. It passes some SQL along to the database (using SqlCommand ) in order to get the database to do it.
You create a SqlCommand object as you would normally with the CommandText set with the BACKUP[^] or RESTORE[^] command and then call ExecuteNonQuery()
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
SELECT InventoryID,InventorySubTypeID,Make,Model,SerialNumber,OriginalCost,NetValue,InventoryStatusID, isnull(null ,0) [Adjustment Amount],isnull(null ,0) [New Net Value] ,null [Change Status To],null [Comments] from Inventory_Profile where InventoryID in (inventoryIds)
this scenario the inventoryids is a collection of ids like below
SELECT InventoryID,InventorySubTypeID,Make,Model,SerialNumber,OriginalCost,NetValue,InventoryStatusID, isnull(null ,0) [Adjustment Amount],isnull(null ,0) [New Net Value] ,null [Change Status To],null [Comments] from Inventory_Profile where InventoryID in (1,2,3,4,5)
the above query want to take 5 rows from DB
this scenario i want to pass the ids at run time as a string in C#
Also how will i take the string in the DA class(C#) to execute it
guide me please
This method is in DA class
public DataSet SelectAssetStatusValueAdjustmentList(string lessorName,string inventoryIds)
{
string SqlCommand = "SELECT InventoryID,InventorySubTypeID,Make,Model,SerialNumber,OriginalCost,NetValue,InventoryStatusID from Inventory_Profile where InventoryID in (@InventoryIDs)";
Database DB = DatabaseFactory.CreateDatabase(lessorName);
DbCommand DbCmd = DB.GetSqlStringCommand(SqlCommand);
DB.AddInParameter(DbCmd, "InventoryIDs", DbType.String, inventoryIds);
DB.LoadDataSet(DbCmd, InventoryIdList,"TABLE");
return InventoryIdList;
}
While i pass the inventoryIds as a string of
collection 1,2,3,4,5...
This time the DA Class addinparameter is defined as string DbType.String
how will the query will take as collection of numbers or as a string while execution
-
|
|
|
|
|
Take a look at this page[^]. I've used the iterative method for SQL Server 2000 and it works really well!!
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
hello friends,
i am creating a table using this
Dim tbl As New Table, cat As New ADOX.Catalog
cat.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\TagInfo.mdb" & ";"
tbl.Name = "TagInfo"
For ii = 0 To TotalTags - 1 '(any number)
tbl.Columns.Append tagName(ii), adInteger '(array of string type )
Next
cat.Tables.Append tbl
Dim CN As ADODB.Connection
Dim RS1 As ADODB.Recordset
Set CN = New ADODB.Connection
Set RS1 = New ADODB.Recordset
CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\TagInfo.mdb;persist security info=false"
CN.Open
Now suppose there may be 7 columns created !
my problem is that how to insert a data into that column
That data may be in some array
plz specify VB command
Thanks in advance
Rahul here
|
|
|
|
|