|
Exactly what I needed Thank you.
And it's not the real table name and field.
I am a newbie
|
|
|
|
|
You can use 'not in' in query :
select * from table1 where idperson not in (select idperson from table2)
Om Prakash
|
|
|
|
|
hello, i get this error-> System.Data.SqlClient.SqlException: Login failed for user 'xxx\ASPNET'
do some one knows how to solve it?
i am new to sql and i use msde.
thank u in advance
|
|
|
|
|
See my response to your cross-post in the C# forum.
Grim (aka Toby) MCDBA, MCSD, MCP+SB
|
|
|
|
|
I have a trigger that inserts every action made by the implementation department of my company, including the query, but when they use the Enterprise Manager the query is shown as sp_executesql;, but that isn't of any help for me, what i really need is the actual query that's begin executed by the sp_executesql, any help or clue would be greatly appreciated
|
|
|
|
|
when using embeded sql,i declare and open a cursor in a function which worked well,and fetch record from the cursor in other function,the problem was that the record had been fetched,but the return sql code was -1,why?
and the other problem:the similar problem occured when declare and open a cursor,the return sql code was -1,it's bad result.
thans!
|
|
|
|
|
Without some sort of sample code, my guess would be that your cursor isn't declared as a global cursor, and you're having scope issues trying to access it from different routines.
Grim (aka Toby) MCDBA, MCSD, MCP+SB
|
|
|
|
|
HI,
Is the a way for me to call a store procedure within the DTS package?
regards,
Chris
K-PAX? YOUR BUSINESS NEED, OUR CUSTOM MADE
|
|
|
|
|
Yes
Within the DTS editor, there is a task type called "Execute SQL Task."
Set up one of these tasks and set the SQL statement to "EXEC sp_MyProc"
Grim (aka Toby) MCDBA, MCSD, MCP+SB
|
|
|
|
|
It work great, thanks a lot.\
regards,
Chris
K-PAX? YOUR BUSINESS NEED, OUR CUSTOM MADE
|
|
|
|
|
CREATE PROCEDURE sp_Get_Products_By_Search
@SearchString nvarchar
AS
Select * from vw_Categories_Products
Where ProductName LIKE '% @SearchString %'
return @@rowcount
How can i change it to a correct statement?
Please help me. Thanks.
Simon
|
|
|
|
|
Hi Simon. Would this work?
CREATE PROCEDURE sp_Get_Products_By_Search
@SearchString nvarchar
AS
BEGIN
Select * from vw_Categories_Products
Where ProductName LIKE '%' + @SearchString + '%'
return @@rowcount
END
|
|
|
|
|
i found some resources indicate that ADO.NET has advantage over ADO bcoz of its disconnect features, using Datasets, copy data to datasets and disconnect from database(datasource), i wonder how does it handle the frequent update in database made by other connection,
for example we have two users, accessing a table, one user use datasets, and disconnect, and do manipulation with data in datasets before finally updated to database.
But what will happen if the other user change data in database, since the first user is already disconnected, data in his datasets may not be updated as the other user has changed it.
This is the doubt that i have, i know there must be some mechanism to handle this.
Could somebody enlighten me?
Thanks
|
|
|
|
|
Hi!
I want to create an app that would diagnose and repair (if possible) .mdb files. Where should I start? Is there a particular librady that I should work with?
Thanks!
---------------
Tired of Spam? InboxShield for Microsoft® Outlook® and Outlook Express®
http://www.inboxshield.com
|
|
|
|
|
How do I update the database if I don't know which row to update. The selected datagrid row doesn't match that of dataset row because of how I display things. So how do I match up the dataGrid row to the dataTable row?
|
|
|
|
|
hi,
The one way which appears in my mind is :
While displaying the dataset content on the datagrid maintain the datagrid row :: dataset relation (may be in the form of HashTable) and later on while updating refer to this relation HashTable to locate the dataset rows or columns...
Hope this helps you... sorry if I haven't got your question right...
regards,
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
hi, how would I go about setting up a hashtable. I haven't worked with the hash Table yet. What I did try, what to see whether the table contained the a row with a field that matches the first cell in the datagrid. But it made my dataAdapter or something to stop working before the problem even hit that function. yet gave no errors at start-time.
|
|
|
|
|
How to build a DataBase of data types (int, char, struct, …)?
I would like to build an ACCESS DataBase, containing information about all the data types we use.
For example:
Suppose, we have the following C/C++ code;
typedef char ARRAY_8_BYTES[8];
struct Foo1
{
int a[20];
int b;
ARRAY_8_BYTES a6;
char a[8];
};
struct Foo2
{
Foo1 foo1;
Foo1 *pFoo1;
char c[12];
};
Ideally, I’d like to have an ACCESS DataBase, containing data about the Foo1, Foo2 structures. So, I would be able to build a program, which uses this data base and (for instance) generates automatically the C code structure definitions above.
The questions I ask myself are:
1) How to organize data which is hierarchical by nature using a relational
data base such as ACCESS?
2) Are they better solutions than using ACCESS to solve this kind of
problem?
3) Do you know about other databases or commercial softwares that permit to
do this?
4)Could you please give me either a precise answer or links which can help me?
Many, many Thanks.
|
|
|
|
|
Have you ever used XML? It's great for storing hierarchical data and it's very similar to HTML, so if you've done any web design that will give you a head start. The .NET Framework has lots of built-in classes for dealing with XML files and data streams.
Official W3C XML site: http://www.w3.org/XML/
Microsoft's XML developer center: http://msdn.microsoft.com/xml/
I'm not the one to ask for help on this as I'm not too familiar with the details of how it all works, just a few general ideas, but it's just a thought...
|
|
|
|
|
I have thought about XML, but I am not familiar with it either. So I would like to know if it definitely can help me to build a data base of data types, before I invest time in learning it.
Thank you anyway,
|
|
|
|
|
Hi all,
i have a problem with executing the following command
BDCC Shrinkdatabase ( db_name )
this command gives me an error cannot shrink databse because log file in use
i have tried to run the server for a single user to do that but i had the same error
anybody know about this error
Thanks for help,
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Did youi read the Sql Server Books online. Open it and index on DBCC Shrinkdatabase
Got this samll bit, you should read more about it to get a full understanding
For log files, SQL Server uses target_percent to calculate the target size for the entire log; therefore, target_percent is the amount of free space in the log after the shrink operation. Target size for the entire log is then translated to target size for each log file. DBCC SHRINKDATABASE attempts to shrink each physical log file to its target size immediately. If no part of the logical log resides in the virtual logs beyond the log file's target size, the file is successfully truncated and DBCC SHRINKDATABASE completes with no messages. However, if part of the logical log resides in the virtual logs beyond the target size, SQL Server frees as much space as possible and then issues an informational message. The message tells you what actions you need to perform to move the logical log out of the virtual logs at the end of the file. After you perform the actions, you can then reissue the DBCC SHRINKDATABASE command to free the remaining space. For more information about shrinking transaction logs, see Shrinking the Transaction Log.
Because a log file can only be shrunk to a virtual log file boundary, it may not be possible to shrink a log file to a size smaller than the size of a virtual log file, even if it is not being used. For example, a database with a log file of 1 GB can have the log file shrunk to only 128 MB. For more information about truncation, see Truncating the Transaction Log. For more information about determining virtual log file sizes, see Virtual Log Files.
|
|
|
|
|
I get this error from e.StackTrace:
at System.Data.OleDb.OleDbConnection.CreateInstanceMDAC()
at System.Data.OleDb.OleDbConnection.GetObjectPool()
at System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr)
at System.Data.OleDb.OleDbConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at WindowsApplication5.Form1..ctor()
What does that mean???
|
|
|
|
|
Thiis linee does not contain your error message. And also what is your code which cause this exception?
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
DB: Access 2002
Prog: VB6 (using DAO 3.6)
(Italics are relationships)
tbl_Customer
l_Mem_id
str_First
str_Middle
str_Last
l_Phone
(etc...)
tbl_LATCH
l_ID_id
dt_Date
l_Mem_id
str_Note
tbl_Children
l_ID_id
l_Mem_id
str_Name
dt_Date
dt_DOB
I am trying to build a recordset which pulls all the people from tbl_LATCH and builds a recordset that has a field [Count] which is the total number of children they have and another field [Ages]** which is the ages of the children. Also, included is the fields from tbl_Customer.
**[Ages] i.e. (4, 5, 12, 10) If there were four recordsets returned from the subquery or whatever then it would concat them into one field.
Any help would greatly be appreciated. Thanks in advance.
-Garrett
|
|
|
|