|
zbasementman wrote:
the tables exposed to triggers are 'inserted' and 'deleted'.
Both of these are also not working for me
|
|
|
|
|
I think if you change your select to this format, it may work:
select @count = count(COLUMN_NAME) from INSERTED
|
|
|
|
|
hello,
i have long string to store in my database.
i am using varchar, but its too small for storing it.
i used text before, but i can't use where clause with it without using LIKE nad IS NULL.
so which datatype should i use for storing storing complete information?
LOOKING FOR GUIDENCE
ASIM NAZIR
Asim
|
|
|
|
|
i think varchar is best option.
sorry for my bad English.
|
|
|
|
|
If you can get away with it, use a varchar(7500). If your data is larger that 7500, you will need to use text.
You can also use PatIndex and CharIndex with text fields.
So, if you want to do an equality join, you can use something like:
where
CharIndex('StringToSeek',TextField) = 1
onwards and upwards...
|
|
|
|
|
Hi All!!
I have binded my text fields to DataColumns of table at runtime.In data navigation mode, all text fields of my application are disabled. When I press the 'Add New' button, all fields are enabled and cleared.
Problem is that when I focus to next control, all the data of current record is again loaded in all textboxes . While I want to remain them clear.
plzzzzzzzzzzzzzzzzz help me.
Thanx in Advance
sorry for my bad English.
|
|
|
|
|
I have a website that needs to access a SQL Server 2000 database hosted on the local machine. I've created an ODBC connection to the database and created users with applicable permissions in the database itself, but when I try and login with the query analyzer or from the website I get the error "SGL doesn't associate this user with a trusted connection." This is the DSN I'm using.
DATABASE_DSN = "Provider=SQLOLEDB.1; Password=abcd; Persist Security Info=True;User ID=abcd;Initial Catalog=extrosite;Data Source=LocalServer"
Please help
Paul
I have been afraid always. When you see something insurmountable ahead of you, say to yourself: "All right! I am afraid. Now that I've been properly afraid, let's go forward." That is the whole secret. - Jeanne d'Arc
modified 18-Jul-18 11:59am.
|
|
|
|
|
Don't worry peeps I've solved it
Paul
I have been afraid always. When you see something insurmountable ahead of you, say to yourself: "All right! I am afraid. Now that I've been properly afraid, let's go forward." That is the whole secret. - Jeanne d'Arc
modified 18-Jul-18 11:59am.
|
|
|
|
|
|
a) I had to configure my SQL server to accept SQL authentication by opening Enterprise Manager, opening properties for my server, and on the Security tab setting authentication to SQL/Windows NT as opposed to NT, and...
b) fixing my connection string. The new one became:
DATABASE_DSN = "Provider=sqloledb;Data Source=(local);Initial Catalog=extrosite;User ID=abcd; Password=abcd"
Paul
I have been afraid always. When you see something insurmountable ahead of you, say to yourself: "All right! I am afraid. Now that I've been properly afraid, let's go forward." That is the whole secret. - Jeanne d'Arc
modified 18-Jul-18 11:59am.
|
|
|
|
|
hello,
i am reading values from an html page, now i want to put them into database.
now, should i put them directly i.e. get one by one from the page and continue putting them to database accordingly. or
i should first write the values to a .txt file (say a.txt) and then enter them to databse using this text file.
?
am using SQL SERVER2000 AND C#
ASIM
Asim
|
|
|
|
|
I'm presuming you are looking for tags or something?
If one insert fails should they all fail?
Probably get all values from page, then insert one by one.
Cheers,
Simon
"Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
animation mechanics in SVG (my first abstract photo)
|
|
|
|
|
Hi,
i insert a new recordset in ADO
_RecordsetPtr rs;
...
rs.AddNew()
After this i set the fields in rs with my application data and do a
rs.Update()
My Problem is that if copy back the data from rs to my application
i get an error on fields which have a standard value like datetime (getdate()).
One method to avoid this problem i've found was to close and open the recordset again,
but in this case i have to move the rs to the right position, using GetAbsolutPosition won't work because in some tables my primary key consists of more than 1 column so there is no guaranty new recordset goes to the end of the table.
Any help /ideas to solve this problem are welcome
thx in advance !
|
|
|
|
|
hello,
am working in c# an dtrying to connect to a sql server database.
my where clause is not working. without whre it's fine.
exception is :
the text,ntext and image data types can't be compared or sorted , except when using IS NULL OR LIKE operators.
now how can i use where clause.
e.g. plz
ASIM
Asim
|
|
|
|
|
I think the error message is self-explanitory.
onwards and upwards...
|
|
|
|
|
I get this problem using an OleDBConnection and executing a source code that inserts and deletes on multiple tables under same transaction (connection.BeginTransaction()). The problem decreases if I remove transactions management but the only crucial work around, for the moment, is closing and opening the connection before any insert, which is not acceptable solution.
Thanks,
Luigi
|
|
|
|
|
I am having trouble with the layout of the database to store source code.
I need someone to explain to me how to build the db so that I can create
categories and sub categories in a treeview. I am going to add the nodes
at runtime from a nodes table. The biggest thing is how to have multiple
nesting levels. Or if the subcategory has some code and more subcategories.
I know this dont begin to be all the info needed but it will give me a start.
Thank You
Bo Hunter
|
|
|
|
|
Run a search on google for 'celko tree' and see the large amount of information on how to do just this.
It's not that hard, just takes some planning.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Here are some table layouts we use for a hierarchial "file system" that is browsed via a tree in a web browser:
create table ic_DocumentCategory
(
DocumentCategoryKey int NOT NULL IDENTITY,
CompanyKey int NOT NULL,
Description varchar(80) NOT NULL,
VisibleToInternalUsers bit NOT NULL,
VisibleToExternalUsers bit NOT NULL
)
GO
create unique clustered index ic_DocumentCategoryDesc_idx
on ic_DocumentCategory (CompanyKey, Description)
create unique index ic_DocumentCategory_idx on ic_DocumentCategory (DocumentCategoryKey)
GO
create table ic_DocumentFolder
(
DocumentFolderKey int NOT NULL IDENTITY,
DocumentCategoryKey int NOT NULL,
ParentFolderKey int NULL,
Description varchar(80) NOT NULL,
OwnerInternalUserKey int NULL,
VisibleToInternalUsers bit NOT NULL,
VisibleToExternalUsers bit NOT NULL
)
GO
create unique clustered index ic_DocumentFolderCatParentDesc_idx
on ic_DocumentFolder (DocumentCategoryKey, ParentFolderKey, Description)
create unique index ic_DocumentFolderKeyDesc_idx
on ic_DocumentFolder (DocumentFolderKey, Description)
create unique index ic_DocumentFolderParentDesc_idx
on ic_DocumentFolder (ParentFolderKey, Description, DocumentCategoryKey)
GO
create table ic_DocumentFolderAccess
(
DocumentFolderAccessKey int NOT NULL IDENTITY,
DocumentFolderKey int NOT NULL,
CompanyKey int NULL,
CompanyUserKey int NULL,
RoleKey int NULL
)
GO
create unique clustered index ic_DocumentFolderAccessFolder_idx
on ic_DocumentFolderAccess (DocumentFolderKey, DocumentFolderAccessKey)
create unique index ic_DocumentFolderAccess_idx
on ic_DocumentFolderAccess (DocumentFolderAccessKey)
GO
create table ic_DocumentFolderFile
(
DocumentFolderKey int NOT NULL,
AttachmentKey int NOT NULL,
CompanyUserKey int NOT NULL
)
GO
create unique clustered index ic_DocumentFolderFile_idx
on ic_DocumentFolderFile (AttachmentKey, DocumentFolderKey, CompanyUserKey)
create unique index ic_DocumentFolderFileFolderAttach_idx
on ic_DocumentFolderFile (DocumentFolderKey, AttachmentKey, CompanyUserKey)
create unique index ic_DocumentFolderFileUserFolderFile_idx
on ic_DocumentFolderFile (CompanyUserKey, AttachmentKey, DocumentFolderKey)
GO
This syntax is for MS SQL7 or higher. Hope it gives you some ideas...
onwards and upwards...
|
|
|
|
|
I have error :
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
If you've got a solution to my problem, please help me !
|
|
|
|
|
Hi!
I'm currently developping an application that can communicate with Oracle, MySql or SqlServer Dbs thanks to ODBC.
It seems that the connection to these servers is slower on Windows 2000 server than on other Windows versions. (5 or 6 times slower)
Maybe it's because of a service or a network security option I should disable.
Please help me if you've got some ideas about my trouble.
jpeg
|
|
|
|
|
Is your connection configured to use TCP/IP or named pipes? TCP/IP is faster. Also, check that you are connecting using SQL Server authentication, rather than NT Authentication.
onwards and upwards...
|
|
|
|
|
Thank you for your answer but I already use TCP/IP and SQL Server authentification.
The power and memory of machines (2000 Pro and 2000 srv) are similar and they work on the same domain than the ODBC client ... I don't understand what is the problem.
I will keep on looking for one solution. Thanks.
jpeg
|
|
|
|
|
We ran into this when W2K first came out... but I don't remember what the solution was... sorry.
onwards and upwards...
|
|
|
|
|
I have a my program that writes data to an SQL database. It uses a loop to write in the data each time. But if I try to exit it Or the screen saver comes on, my program crashes and a NOT RESPONDING message comes up.
How do I fix this as I need to be able to exit my program if required..
Thanks.
grahamoj.
|
|
|
|