|
I don't have any books on SSIS, but SQLIS.com[^] is a useful site.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks Paul, I have bookmarked it!
|
|
|
|
|
Hi, I have a problem. Both simple and weird. Say I have ParentTable and ChildTable. Obviously, ChildTable is a child of ParentTable. Both are strongly-typed DataSets.
When I create rows for them, I start by creating a ParentTableRow (dataset.ParentTable.AddParentTableRow()), and inserting it into my dataset.
Then I create my childTable the same way, and I have to specify the a ParentTableRow, as a reference to its parent. I do it and it looks fine in the debugger (i.e. the ParentTableRow is set). I insert the child row into the dataset too.
Then, before committing the changes to the database, I must call GetChanges() on ChildTable, which gives out an array of all rows that have been changed since the loading of the dataset. My new ChildTableRow appears, BUT the ParentTableRow member, (the reference to its parent) is NULL, although it was set earlier!
Just before the call to GetChanges() I looked at my ChildTable in the debugger (from dataset.ChildTable) and guess what? The ParentTableRow is still there! It looks like GetChanges() ignores the reference to the ParentTableRow or something...
Has anyone any idea of what's going on and how to get though this?
Thank you!
|
|
|
|
|
why don't you call GetChanges on the whole dataset itself? I think it would solve your problem.
|
|
|
|
|
Well thanks, it solves my problem, but do you know why it is so? I sincerely feel like I'm missing a piece of the puzzle here.
Thank you very much!
|
|
|
|
|
No. I don't know why it is so
|
|
|
|
|
Hai All,
Can u plse tell me that how can i generate script in MS Access?
Or How can i get all tables in MS Acess to sql server 2005?
Plse Help me
Thanks in advance.
Regrds
Lijo
|
|
|
|
|
Lijo Rajan wrote: How can i get all tables in MS Acess to sql server 2005?
Did you try searching Google? I did and found this link[^] at the top of the list.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi
i have one table
-------------------------------------------------------------------------
Analyst security Stock User Assign Status Updated Updated
code(pk) code Name Id Date Code By Date
-------------------------------------------------------------------------
1 500103 HDFC PatelAmi Jul 20 2007 A - - 2 500410 ATC Ltd Shah Vis nov 01 2007 A - -
-------------------------------------------------------------------------
In my Project my first query is
update tAnalystAssignHistory set StatusCode ='C'where
UserId ='PatelAmi' and StockName='HDFC LTD'
in this query status code will update.
i want 2nd query is like ===
I want to INSERT same 1st record in new row But i didnt have any control for inserting record .Only i have StockName,UserId,UpdatedBy,UpdatedDate
that valus i will be insert other are same to same 1st record.so how can i write it.
pls help me
its urgent.
Gayatri
|
|
|
|
|
table --
-------------------------------------------------------------------------
Analyst.|security |Stock.|User.....|Assign.....|Status|Updated|Updated|
code(pk)|code.....|Name..|Id.......|Date.......|Code..|By.....|Date..|
-------------------------------------------------------------------------
1.......|500103...|HDFC..|PatelAm..|Jul.20.2007|..A...|...-...|..-...|
2.......|500410...|ATCLtd|Shah Vis.|Nov.01.2007|..A...|...-...|..-...|
Gayatri
|
|
|
|
|
hello pls give me a reply
Gayatri
|
|
|
|
|
Hi i have table of the record 1000 and want to to show the record in 4 different column means that 250 record in first column and 250 record in second and then after that 250 in third and 250 in fourth how i can do this
wasim khan
|
|
|
|
|
First of all, use more meaningful names for your posts. 'plz tell me how' doesn't give any indication what your question is. Read the forum guidelines.
In answer to your question, write four subqueries to fetch the rows in each range. For each subquery, use the ROW_NUMBER function to assign a number to each row and select the rows within the required range.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Please pick a more meaningful topic and rephrase your question.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi
can any one tell me how to encrypt a password! What logic should i use
thanks
kssk
|
|
|
|
|
If this is a C# question, why didn't you post it in the C# forum? Your question has nothing to do with SQL.
If you are using .NET 2.0 or above, have a look at the Membership[^] provider. It provides a framework for role-based security which includes functionality for password hashing/encryption using the MD5 and SHA1 algorithms.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
like this, in a loop, n is from 1 to 1000
<br />
UPDATE t1 set a=calc_heavily where id=n<br />
UPDATE t1 set b=a where id=n<br />
The problem is that, the second UPDATE fails sometimes. Is there a sync problem? How make it successful everytime.
|
|
|
|
|
When you say it fails, do you get any error messages?
Have you tried transactions?
|
|
|
|
|
How about:
<br />
UPDATE t1 set a=calc_heavily, b=a <br />
where id=n<br />
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
Hi all,
I'm currently doing a contract and supplier system, using VB.net and MSSQL.
I have this table (Contract) containing the following fields:
Contract_ID INT NOT NULL,<br />
Vendor_ID INT NOT NULL,<br />
ContractDate datetime,<br />
DateStart datetime,<br />
DateDue datetime,<br />
PRIMARY KEY(Contract_ID),<br />
FOREIGN KEY (Vendor_ID) REFERENCES Vendor(Vendor_ID)
1) I am going to do something like select contracts up for renewal in X months, eg in 3 months. (the syntax is one thing i'm not sure)
2) But the datetime format for both VB.net and MSSQL are different as shown below. (the format differs would matter too much? cos in the end, we are still proceeding with sql datetime format code.)
http://i5.tinypic.com/7xaeo95.jpg
http://i4.tinypic.com/739s66g.jpg
3) Do I put the codes in vb form or in vb's stored procedures?
I think it is something like this: http://www.outlookcode.com/d/code/remindbday.htm
But I have no idea how to start.
I hope the info I gave are not too vague. Any help is appreciated. Thanks.
|
|
|
|
|
you can do it in Stored Procedure, use the convert function, then where clause to serve the purpose. something like
set @Date = CAST(DATEPART(YEAR, @Date) as varchar) + '-' + CAST(DATEPART(MONTH, @Date) as varchar)+ '-' + CAST(DATEPART(DAY, @Date) as varchar) + ' 00:00:00'
|
|
|
|
|
Hi,
thanks for the reply. Regarding stored procedure, what would I need to do to show the contracts up for renewal?
But if you don't mind can you explain what the code does? What would be the @Date ?? Why is it plus-ing? Sorry, I quite a beginner for database.
telly
|
|
|
|
|
@Date is your parameter @DateStart, convert the Dateformat, so that you can strip it out and select which ever datepart you want, like year, month, days. the concatination separates the date part, to be able to easily select
like select contractID from XXX
where @DateStart between 01-10-2007 to 03-12-2007
hope you get this time..
|
|
|
|
|
hi...
plz somone help me write these queries..
i want to search the data's from employee select the employee name,designation_name
where
1)employee code that i can pass or else designation name i can pass
2)only one i can pass from theses 2
3)the employee can contain null value for desination name
4)constraint is :employee.designation_id=desig.designation_id
plz somone help me out to solve this pblm
|
|
|
|
|
What part of your code are you specifically having difficulties with? At the moment, it sounds like you want someone to do your work for you.
You haven't stated what database you are you using. However if it is SQL Server, I suggest you do some research on writing stored procedures to encapsulate the logic for your search.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|