|
How can i add a text file in my database
like right now i am making an application in which i have to save all the text
the text will be about say max 3 pages each file
can i save it in SQL server
and if i can how do i do it
i will also need to concatenate string to it....
plz help,
i am a beginner
XANEB
|
|
|
|
|
I can help you with concatenation of text strings. See next page of the phorum "ntext concatenation". If you need more explanations or examples I'll send it on demand.
My best regards
|
|
|
|
|
You could attempt to parse the file line by line, and add to a VARCHAR field in the DB...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hi All,
I have a scheduled task to back up my database every day at specified time.IF i continuosly change my system year,error_handler function is getting called with the following parameter values
severity = 9
dberr = 10025
oserr=65534
dberrstr=possible network error: write to sql server failed.general network error.check your documentation
oserrstr=ConnectionRead(recv())
what might be the reason for this error.
Thanks in advance
Raghu
|
|
|
|
|
hi
how can i change connection string to connect sql server reporting services report in case of changing login or pwd of database.....or chnage of database with same shema...
RAF
SE-Netsol Pakistan
|
|
|
|
|
If you use .net framework , store it in a config file of your application so you can change it without recompiling it or store it in a file which you can change it easily , you can also force user to enter his/her username/password. Another way is to use windows authentication for you sql , so no username/password required in connection string.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
Hi,
Please help me...
I ve 2 tables like one is 'emp' & other is copy of 'empc'
Wht i want...whenever i update the emp table the old contents should be moved to the empc table & the new should be overwritten in the emp table...
& i want all this should be done through a trigger...may be on update... but...this will overwrite the contains of emp...so wht should i do....
Thanks
|
|
|
|
|
hi
you need something like this :
create trigger empCopyTrig on emp
for Update
as
insert into empc Select * from deleted
Go
try it..Waiting for feedback 
|
|
|
|
|
When using triggers to update a table, the rows which will be affected by the update statement will be available in 'deleted' table and records with updated changes will be available in 'inserted' table. These two tables are available only during trigger execution and not outside the scope of a trigger.
BK
Bhaskara
|
|
|
|
|
Hi,
Let's face it, I don't understand how I can do the following. Let's explain a little :
* I have an online database (in fact mysql). I access this base through ByteFX's MySQLDataAdapter.
* I have an application which can read data from it but also can modify them WITHOUT necessary doing a fill (updating the database back). In fact, this application could be closed without having done the updates, inserts, etc.
* I do not have issues like online datas beeing changed or multi-people acceding the datas. Only this application is responsible of the database.
What I want is when the application is launched again, the "not updated yet" part of the datas are still there. So I need to cache them in some file.
What is the best approach to do that ?
Thanks
|
|
|
|
|
Hi,
If there is a problem of data which is not updated in database are still there in application.
You can go for cache the web page using the output caching for specifying some duration of time.
<%@ outputcache=5%> --> this take 5 minutes duration of time.after that i getting the refreshed data to display on the page.
i think this may work for you.. instead of cache in files.
regards,
sukesh.g
Sukesh.g
|
|
|
|
|
how tp retrieve real hard drive serial number
|
|
|
|
|
If you use .net see this article. You can do it with WMI:
http://www.codeproject.com/csharp/wmi.asp[^]
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
|
Hello All,
I have 2 SQL2000 DBs on the same server, in DB#1 I have a stored procedure from which I need to get a field from a table that exists in DB#2.
Any Ideas,
Thanks in advance
|
|
|
|
|
Syntax is: [ServerName].[DatabaseName].[Owner].[TableName].[FieldName]
So in your Stored Proc your request might look like:
SELECT myField
FROM myServer.myDatabase.dbo.myTable
WHERE myField = 'some value'
ServerName can be an ip address, or if it is on the same server - just a different database - you can omit ServerName altogether.
Owner is usually 'dbo' -- otherwise substitute the table's owner
|
|
|
|
|
Quick Question:
I have a number of SQL/MSDE databases on the local company server.
Each database uses identical stored procedures for quick updates to their record items.
Can I use just one copy of the stored procedure for use by all the databases, instead of duplicate in each one? If yes, does this have to go in the master database. How would you distinguish the active database (perhaps using Using dbo.???)?
I Dream of Absolute Zero
|
|
|
|
|
You must to inform the database by parameter....
I worked in a proyect where each database had the data of an specific mounth and Year.
To solve that we had a central DB with the stored procedures and a set of parameters, for example, the name of the last DB, and the name of the previous DBs, etc....
Regards....
Carlos Antollini
Do you know piFive[^] ?
|
|
|
|
|
try adding the new stored procedures to the model database
all new databases are a copy of the model database so they will contain the stored procedures you created.
|
|
|
|
|
True, but if one of the stored procedures needs to be updated, it will then have to be applied to all databases.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Colin Angus Mackay wrote:
but if one of the stored procedures needs to be updated, it will then have to be applied to all databases
Exactly.
What I was after is a central location where all the databases could access these SPs. Changes to the SP would then immediately be reflected to all the databases.
I have searched, but to no avail. I can only assume that this is not [easily] possible.
I Dream of Absolute Zero
|
|
|
|
|
There are several Computers with SQL Server 2000, only connected while replication with dial-up connections (ISDN Router). One Computer is the Publisher, this one also initiates the Replication.
Today we only provide Data from the Publisher to all the subscribers with a Snapshot replication.
On the Subscribers the Application generates Log Data. We want to collect the Data from all the Subscribers to the Publisher.
My idea was to do a merge replication and filter the rows by a new field that contains the Hostname of the subscriber. But because the Publisher initiates the replication, the HOST_NAME() function is set to the Publishers name.
Is there a possibility to get the hostname of the subscriber or does anybody know a better solution to this problem?
Greets
Roland
|
|
|
|
|
I have a problem that I wonder if you all can help me with. I have a table that could be updated every second, or every ten minutes (or more). I need to get the data from that table to provide real-time representation on a web page.
To minimize the round trip to and from the db on the network, I had suggested that we retrieve data from the table and hold onto it in the Application Cache which refreshes itself every x seconds so that if many users are trying to view the data, they all pull from the Application Cache, not from SQL Server. However, it has also been suggested to me (by my supervisor) that we code a Trigger or a Job in SQL Server to generate a static HTML page (either on a schedule, or every time one of the fields in the table is updated) so that all requests for the page get handled by IIS and don't require a trip to the db.
I can't imagine that this is a good programming practice... and I don't expect for more than about 50 users at a time (probably more like 10-20). Can anyone provide me with good arguments for either method?
Thanks
|
|
|
|
|
I have to agree with your supervisor on this one. Always go to the source when you can, otherwise you risk presenting invalid data. I would not build new HTML on every update. I would use a version based system for speed.
Example
HTML_Table
===============
HTMLid int
Updater int
HTMLData NTEXT
Every time you rebuild the HTMLData you set the Updater to zero.
UPDATE HTML_Table
SET
Updater = 0,
HTMLData = "whatever"
WHERE HTMLid = 1
Every time you update a table that can change your HTML, increment the Updater:
UPDATE HTML_Table
SET Updater = Updater + 1
WHERE HTMLid = 1
Every time a page needs the HTML:
(1) If the updater > 0 the rebuild HTML
(2) return HTML
This part would best be implemented in a Stored Proc. Remember, SQL Server will cache the last few requests on its own - no need to build your cache system that never knowns when it is out-of-date.
|
|
|
|
|
Hi, guys.
How can I know MSDE 2000 has been installed successfully or not?
I think I install it. But I cann't use it.
Why?
vigorous
|
|
|
|