"how this is automaticly generated by you."
Not by me, by VisualStudio. After you add to adapter a new query via wizard
in design time, VisualStudio adds new method to the adapter with params
according to required sql params.
I'm using VS 2005.
"are you sure that this is the used SQL string and not the part "
Yes I'm sure.
I think I know what is the problem. Under select I have value params
@currUserId and @viewID. So VS don't recognize their type and couldn't add
them automaticaly...
I have such a problem only if I insert new values from another table (using
select). In case of regular insert with "INSERT INTO .... VALUES(....)"
syntax it works perfect.
Your advice...
"Cor Ligthert[MVP]" <(E-Mail Removed)> wrote in message
news:BBD77EF1-C89D-482A-A2D6-(E-Mail Removed)...
> Akeksey
>
> Will you show us how this is automaticly generated by you. Visual Studio
> has more methods therefore:
> What version of VS and how did you do it,
>
> For the rest are you sure that this is the used SQL string and not the
> part that is set in the DataAdapter and then concatinated with the part
> for the Update, in fact use the Update and the Insert the same parameters.
>
> Cor
>
> "Aleksey Timonin" <(E-Mail Removed)> schreef in bericht
> news:%(E-Mail Removed)...
>> Hi guys,
>> I'm using Dataset in my project. In design time I configure TableAdapter
>> in the Dataset and set to the adapter as an Insert query following sql:
>>
>> INSERT INTO UserInterface.ViewFields
>> (createdBy, createdOn, modifiedBy, modifiedOn,
>> viewId, fieldId, logicalFieldName)
>> SELECT @currUserId, GETUTCDATE(), @currUserId, GETUTCDATE(), @viewID,
>> fld.id, clmn.name
>> FROM UserInterface.Fields AS fld INNER JOIN
>> DBMetaData.Columns AS clmn ON fld.columnId = clmn.id
>> WHERE (clmn.tableId = @tableID)
>>
>> The problem is that the method automaticaly generated by VS for this only
>> sql (with others I don't have such a problem) has no parameters!!! I was
>> more confused, when by click on "Query Builder..." -> "Execute Query" in
>> "TableAdapter Query Configuration Wizard" VS asked me to enter these
>> params!!!
>> Does anybody know about the bug, and know how can I resolve it?
>>
>> Thanks a lot
>> Aleksey
>>
>
|