Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Friday, March 30, 2012

Problems with Table Adapters

1) I have added new fields to the database, now seeems I need to remove method from table adapter and add it again. Is there any simple way to have table adapter refreshed after adding a field to the stored procedure?

2) Also I have noticed that when I try to edit existing method (configure option), it tells me that method name can not be the same for fill and get. any idea? It is the same now...

3) Also How do I remove the default method? Delete option is greyed out...

Thanks a lot

hi,


We cannot delete the default method.this method is user to fill and select(Default select command)

Right Click the default method and click on Configure..Now If u are using a stored Procedure then u can see the stored procedure name on the select dropdown.

Click the previous button and select the radio button new stored procedure or select the sql statement (if u are selecting the sql statment write an ordinary sql statement) now go till Finish..now the default select method has changed..

now to use the stored procedure that u have changed do the same procedure and select an existing stored procedure option when we click the prevoius button and continue clicking the wizard until finish.

now u will be using the new stored procedure that has a new field that u have added..

i hope this helps


|||

The problem is that when I click next button on the "Choose methods to generate". I get this error message:

"The names specified for Fill Data table and Get data table can not be the same".

You see, there are the same right now, so I am not sure what I should choose... This is existing starter kit application...

|||

hi,

give different names for the filldata method and getdata method.. these are two different methods..

Eg

'FilldataAddUsers" and

"GetDataAddAddUsers "

Wednesday, March 28, 2012

Problems with SQL-DMO.Job Script method

I am trying to create a vbs program to generate the script for SQL
Agent Jobs. In this program I am using the SQL-DMO objects for SQL
Server.
When the output is generated from the Job.Script method the job steps
are not in the correct order. They are ordered by step_name rather
than the step_id. Scripts generated from Enterprise Manager works
fine. It is just the ones from the DMO objects that get out of order.
Anybody have this problem as well?
Thanks in advance.
Keith
Problem solved!
The msdb statistics were not updated and the query was using the
non-clustered index rather than the clustered index. The non-clustered
index was job_id, step_name. The clustered index is job_id , step_id.
Updated the statistics on msdb tables and it worked fine.
sql

Problems with SQL-DMO.Job Script method

I am trying to create a vbs program to generate the script for SQL
Agent Jobs. In this program I am using the SQL-DMO objects for SQL
Server.
When the output is generated from the Job.Script method the job steps
are not in the correct order. They are ordered by step_name rather
than the step_id. Scripts generated from Enterprise Manager works
fine. It is just the ones from the DMO objects that get out of order.
Anybody have this problem as well?
Thanks in advance.
KeithProblem solved!
The msdb statistics were not updated and the query was using the
non-clustered index rather than the clustered index. The non-clustered
index was job_id, step_name. The clustered index is job_id , step_id.
Updated the statistics on msdb tables and it worked fine.

Problems with SQL-DMO.Job Script method

I am trying to create a vbs program to generate the script for SQL
Agent Jobs. In this program I am using the SQL-DMO objects for SQL
Server.
When the output is generated from the Job.Script method the job steps
are not in the correct order. They are ordered by step_name rather
than the step_id. Scripts generated from Enterprise Manager works
fine. It is just the ones from the DMO objects that get out of order.
Anybody have this problem as well?
Thanks in advance.
KeithProblem solved!
The msdb statistics were not updated and the query was using the
non-clustered index rather than the clustered index. The non-clustered
index was job_id, step_name. The clustered index is job_id , step_id.
Updated the statistics on msdb tables and it worked fine.

Friday, March 23, 2012

Problems with PrintOut Method

Hi everybody,

I'm having problems printing several reports after another, e.g. printing from a Loop...

My Code looks like this:

Dim newrep_b as new crep_order_xxx

For i = 0 To rssammel.Recordcount
On Error GoTo 0
newrep_b.ordereinzel = 1
newrep_b.bebrals_id = lsarray(i)
newrep_b.Hide
newrep_b.Report.SelectPrinter "TallyT8004", "", ""
newrep_b.Report.PrintOut (False)
Unload newrep_b
Set newrep_b = Nothing
Next

Lets say I have 5 Records in rssammel...

The First Report gets printed, the second too, but the third one and all reports after are NOT printed...

"PrintOut" raises the error: "Run Time Error '-2147417848': Method 'PrintOut' of object 'crep_order_xxx' failed"

And now the REALLY strange thing...

If I put breakpoints into my code (on the PrintOut - Line), and step through the Loop "by hand" (using F8 in VB-IDE), everything works like a charm...
Without the breakpoint I get the error from above, but the first 2 Reports are getting printed fine...

Does anybody have an idea why CR / VB raises that error ? Is it some kind of timing-problem, or perhaps the Print-Spooler is getting filled too fast ??

Greetings and many thanks for your help in advance !

FusseltierOh, i just saw i forgot some important information in my first post:

I'm using VB 5 Enterprise and CR 8.5...

:)

Greetings
Fusseltier