|
Try running the query through Management Studio. You should get more detailed error information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hmm... sure! i would give it a shot! Thanx for advice!
regards
|
|
|
|
|
That's OK. I would suggest in future however that you investigate problems more thoroughly yourself before resorting to a forum for help. It only takes a few moments to run an adhoc query in Management Studio and should be a quicker way to find the solution to a problem than posting on a forum where you may have to wait several days for a response.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
To solve a problem of participating in a transaction, where COM code calls into .NET 2.0 code, I need the .NET code to participate in the transaction started by the COM code. A distributed transaction is not an option, and sp_bindsession is not working.
I would like, if possible, to receive an ADO connection object in my .NET class, somehow convert that to an ADO.NET connection object, and be done with minimal code changes. However, it is not a train smash if I have to use ADO in my .NET code for the data retrieval. This is my worst case, but only involves minor changes. I just don't like it.
|
|
|
|
|
I want to show 'select * from emp' query result in HTML page as table view (html table )..Is it possible..?
If s how can i?
|
|
|
|
|
If you are using ASP.NET, use one of the data-bound controls e.g. GridView.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I'm using HTML page, not asp.net...so how can i get the info from aspx page to html page
???????????????
|
|
|
|
|
Can you use ASP.net? You may also want to consider a book on web development...
|
|
|
|
|
hi,
In SQL, what is the command to count the raws with select statement.
I AM WORKING ON "PLOTTER ROBOT"(FYP).
|
|
|
|
|
select count(*) from YourTable
|
|
|
|
|
when I do
select 10/5
o/p : 2
select 5/10
o/p : 0
please tell me
how I can get o/p : 0.5
I do not want like written bellow.
---------------------------
select 10.0/5
o/p : 2.000000
select 5.0/10
o/p : 0.500000
You get the best out of others when you give the best of yourself.
|
|
|
|
|
select cast(5 as float) / cast(10 as float)
|
|
|
|
|
Hi,
How can i check the structure of a database in mssql server?
What I mean is I need a function or script which creates the table in the database if that table doesnot exist, and moreover i also need to check the existence of columns in a given table and also check if it's datatype is valid or not,if it is a primary key and so on and so forth.
What I need is just a routine or a sql script to check the data structure of a database?
|
|
|
|
|
You can use IF EXISTS to check if most database objects exist or not. This can be tables, and stored procedures. Give google a shot and it'll turn up a bit of good stuff for you
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I am trying to insert a new record to a database access SQL. The connection is right, The statement is right and if I run it in a local machine it works just fine using express sql. but if I use it in my business server 2003 with the original sql program it does not work. The contactid is an identity column and it should automaticaly incriment and it does under access but it won't work through the command. What am I doing wrong?
Cannot insert the value NULL into column 'ContactID', table 'PLEASANTWEBSQL.dbo.COMPPATSTAB'; column does not allow nulls. INSERT fails. The statement has been terminated.
Dim cmd As New System.Data.SqlClient.SqlCommand
cmd.CommandType = System.Data.CommandType.Text
cmd.CommandText = "insert into comppatstab (firstname, Lastname, middlename, Birthdate, address, city, state, postalcode ) Values ( ...)
This is part of my command text with the values matching.
cmd.Connection = sqlConnection1
sqlConnection1.Open()
cmd.ExecuteNonQuery()
sqlConnection1.Close()
|
|
|
|
|
MUSIWA wrote: Cannot insert the value NULL into column 'ContactID'
Your cmd.CommandText shows no indication of using ContactID...
---modified
I missed the part of ContactID being identity. Are you sure?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Thankyou for replying I realy appreciate it. In my command.text I did not include the contactID because I thought that it will be automatically added when I add the new record. See when I looked at the syntax I did not notice how you add the primary key value if you do not know what the number is. In other words I do not know if I need to include the contactId and what value then do you give it?
|
|
|
|
|
From what I recall, if the ContactID is indeed an identity field with an auto-increment, you do not need to add it into the insert statement. Double check that the field is indeed an identity field and that it is supposed to not have any nulls allowed.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Yeah you were right I had a brain fart The table was recentely made from a query and it does not automaticaly make the primary key an Identity I corrected that and the whole thing works like a charm thanks again You were a life saver!
|
|
|
|
|
MUSIWA wrote: you were right I had a brain fart
It happens...
MUSIWA wrote: it does not automaticaly make the primary key an Identity I corrected that and the whole thing works like a charm thanks again You were a life saver!
No worries, I suspected maybe something was up with the ContactID field
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hi When ever I am trying to restore a database through a job, I am gettingh the following Error Msg:
Cannot open backup device 'd:\ftp\db backup\SE\sg_Differential_Backup.bak'. Device error or device off-line. See the SQL Server error log for more details. [SQLSTATE 42000] (Error 3201) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
The command for restoring the database used is:
declare @flname nvarchar(100)
declare @BaseRestore nvarchar(2000)
Set @flname = 'd:\ftp\db backup\SE\sg_Differential_Backup.bak'
Set @BaseReStore = 'RESTORE DataBase SGSE From Disk =''' + @flname + ''' With Replace'
exec sp_executesql @BaseReStore
Thought when I am trying to restore the database from the Restore option of the database, the restoration is successful.
I am in deep trouble. Kindly help
-----Have A Nice Day-----
|
|
|
|
|
Firstly did you assiduously assiduous wrote: See the SQL Server error log for more details
When you restore a database in SQL Server you need to always restore a complete backup first.
The reason you did not have to do this from Enterprise manager, I'm interpreting the following as meaning enterprise manager
assiduous wrote: Restore option of the database
is because enterprise manager forces the restore from the previous full backup.
My first suggestion is to read the error log then if it is what I suspect you will need to first restore the full backup then restore the differential backup.
You always pass failure on the way to success.
|
|
|
|
|
Dear All,
I am working on a project towards a text retrieval system. In the system, a document is represented by features (i.e., some words and phrases conveying the essence of the document). And the similarity between a query and a certain document is dertermined by counting the matching of features. Currently, at retrieval time, features of all documents are held in memory. However, holding all feature data in memory will become impossible as the number of documents dramatically increases.
I have thought of this problem for a long time. The only way I can figure out at this time is to use database technology. However, the problem that follows is that the drop-off in efficiency (retrieval response time will increase as accessing hard disk, where database is located, is slower than accessing memory ) by using database technology. I do not have any experience and idea about this. Or there may be other better technologies available?
Sometimes, I wonder how Google to solve this problem.
Please help. Thanks!
|
|
|
|
|
Theres quite a few ways that these problems are solved - you might want to read up on different caching strategies and indexing techniques. Generally this is taken care of in a large part by the database software. Some databases servers are quite specialized at rapid retrieval - such as Berkeley DB[^]. As for similarity and feature recognition, theres loads of research into that - especially for audio fingerprinting.
If you don't want to do anything too funky then just trust that your database server was written by someone that knew what they were doing
|
|
|
|
|
hi
i have too much work at work, so i have decided to take my Company's data home to create a test Environment so that i can develop on weekends. am using SQL2000 at and Export the data to Access Database, after that when i get home ,i used SQL2005. i use Migration Assistant to Export the Access database from Access to SQL2005, but the Consstraints are not Shipped together from Access to SQL2005.Yes i can go and set them again , but my Problem come when i have a large table, i can not activate an Identity Column in that case, it will be Cancelled out with an error that like "timeout" Error. Please tell me how can i import the SQL table from Access to SQL2005 with all the Constraint and Identity field being there.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|