Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Friday, March 23, 2012

recovering file from report server

Hi
Is it possiable to recover a .rdl file from the report server? I deleted a
report file from Visual Studio, but it was succesfully published to the
report server.
Any help is appreciated.
thanksImRhcndpbiIgPGRhcndpbkBkaXNjdXNzaW9ucy5taWNyb3NvZnQuY29tPiB3cm90ZSANCj4gSXMg
aXQgcG9zc2lhYmxlIHRvIHJlY292ZXIgYSAucmRsIGZpbGUgZnJvbSB0aGUgcmVwb3J0IHNlcnZl
cj8gIEkgZGVsZXRlZCBhIA0KPiByZXBvcnQgZmlsZSBmcm9tIFZpc3VhbCBTdHVkaW8sIGJ1dCBp
dCB3YXMgc3VjY2VzZnVsbHkgcHVibGlzaGVkIHRvIHRoZSANCj4gcmVwb3J0IHNlcnZlci4NCmdv
IHRvIHRvIHlvdXIgcmVwb3J0IHNlcnZlciANCjxzZXJ2ZXIgbmFtZT4vUmVwb3J0cw0KZmluZCB5
b3UgcmVwb3J0DQpvcGVuIGl0IA0KYW5kIGluIHByb3BlcnRpZXMgdGFiIHlvdSdsbCBmaW5kIGVk
aXQgYnV0dG9uLCBwcmVzcyBpdCBhbmQgeW91J2xsIGdldCB5b3UgcmRsIGZpbGUu|||As well as Report Manager you can also use Reporting Services Scripter. If
you need to get multiple reports from the server this will be quicker
http://www.sqldbatips.com/showarticle.asp?ID=62
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"darwin" <darwin@.discussions.microsoft.com> wrote in message
news:792A43C5-18E9-478E-B086-BC6639880020@.microsoft.com...
> Hi
> Is it possiable to recover a .rdl file from the report server? I deleted
> a
> report file from Visual Studio, but it was succesfully published to the
> report server.
> Any help is appreciated.
> thanks|||Thanks to you both. I was rather a bit nervous thinking I would have to
reproduce that report from scratch. Jasper, Thanks for the code link. And a
new site to read!
;)
"Jasper Smith" wrote:
> As well as Report Manager you can also use Reporting Services Scripter. If
> you need to get multiple reports from the server this will be quicker
> http://www.sqldbatips.com/showarticle.asp?ID=62
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "darwin" <darwin@.discussions.microsoft.com> wrote in message
> news:792A43C5-18E9-478E-B086-BC6639880020@.microsoft.com...
> > Hi
> >
> > Is it possiable to recover a .rdl file from the report server? I deleted
> > a
> > report file from Visual Studio, but it was succesfully published to the
> > report server.
> >
> > Any help is appreciated.
> > thanks
>
>

Wednesday, March 7, 2012

Recordset to Array

Using Visual Basic can you assign a resultant recordset to an array
without looping through the number or returned records and fields.
Dim strArray() as String
Dim rs As ADODB.Recordset
rs.Open SQLStatement, Connection
strArray = rs
Many thanks for any assistance.
See if this helps you
http://www.sommarskog.se/arrays-in-sql.html
Madhivanan
|||There are no arrays in SQL Server and nor are they needed. What is your
question?
David Portas
SQL Server MVP
|||String and array are distinct data types in VB. One workaround is to use a
variant array and use GetRows method. See your VB/ADO manual for details and
examples on how to use this method.
Anith

Recordset to Array

Using Visual Basic can you assign a resultant recordset to an array
without looping through the number or returned records and fields.
Dim strArray() as String
Dim rs As ADODB.Recordset
rs.Open SQLStatement, Connection
strArray = rs
Many thanks for any assistance.See if this helps you
http://www.sommarskog.se/arrays-in-sql.html
Madhivanan|||There are no arrays in SQL Server and nor are they needed. What is your
question?
David Portas
SQL Server MVP
--|||String and array are distinct data types in VB. One workaround is to use a
variant array and use GetRows method. See your VB/ADO manual for details and
examples on how to use this method.
Anith

Recordset to Array

Using Visual Basic can you assign a resultant recordset to an array
without looping through the number or returned records and fields.
Dim strArray() as String
Dim rs As ADODB.Recordset
rs.Open SQLStatement, Connection
strArray = rs
Many thanks for any assistance.See if this helps you
http://www.sommarskog.se/arrays-in-sql.html
Madhivanan|||There are no arrays in SQL Server and nor are they needed. What is your
question?
David Portas
SQL Server MVP
--|||String and array are distinct data types in VB. One workaround is to use a
variant array and use GetRows method. See your VB/ADO manual for details and
examples on how to use this method.
Anith

Monday, February 20, 2012

Recordet Problem

I'm creating a Visual Basic program linked to an SQL server DB. In one of my tables I have a field for phone number which is an nvarchar datatype that is stored in the following format (example: 617-782-6415).

I have a form where I want to view the contents of the following recordset:

SELECT d .ACCOUNT_CODE, d .DURATION, d .[DATE], d .[HOUR], d .NUMBER_DIALED, p.ACCOUNT_CODE AS Expr1, p.LAST_NAME, p.FIRST_NAME,
p.SUMMARY_GROUP, p.DIRECT_DIAL, p.TITLE, p.LOCATION, p.DIVISION, p.DEPARTMENT, p.DIRECTOR, p.OLD_CARD_NUM, p.REISSUE, p.CLASS,
p.PHONE
FROM DETAIL d INNER JOIN
PHONE_EMP_MAST p ON d .ACCOUNT_CODE = p.ACCOUNT_CODE
WHERE number_dialed = " & astring & "

The value for astring is pulled from a combobox that stores all the values for number_dialed. However when i run this program i get the error message

"syntax error converting the nvarchar value '401-781-7078' to a column of datatype int"

I dont need to convert it to a column of datatype int so I dont understand this error... can anyone help me?The only thing that can be forcing a convertion is

WHERE number_dialed = " & astring & "

What is this tryin to do?
Take one value frm teh combo box?
I assume as you have " as the string delimitter then you are trying to form the select in VB.
You would be better to create an SP and pass the parameter.
For your string here try

WHERE number_dialed = '" & astring & "'"

i.e. making astring into a string in the query.|||Yeah, I'm trying to form the select in VB because I'm more familiar with that way... I'd prefer to do it in VB if at all possible... Why is it converting it?|||WHERE number_dialed = " & astring & "

will give something like

WHERE number_dialed = 617-782-6415

it will evaluate 617-782-6415 giving a negative number then try to convert number_dialed to an integer for the compare.

you need
WHERE number_dialed = '617-782-6415'
to do a string compare
hence the quotes in my previous post.

Record set update

Hi

I am new to visual studio and I am attempting to edit records held in mysql, the code below runs and throws no errors "strAdd" is underlined and says that it is used before it has been given a value! But If I debug.print(strAdd) I get the expected string returned. What do I need to do to get the updated records saved?

' code

Dim cn As ADODB.Connection

Dim rs As ADODB.Recordset

Dim StrAdd as string

cn = New ADODB.Connection

cn.ConnectionString = "Provider=SQLNCLI;" _

& "Server=(local);" _

& "Database=customerlink;" _

& "Integrated Security=SSPI;" _

& "DataTypeCompatibility=80;" _

& "MARS Connection=True;"

Dim mySQL As String

mySQL = "SELECT*" & _

" FROM tblvsol" & _

" Where RevStatus = " & 0 & _

" And GeoCodeStatus = " & 1

cn.Open()

rs = New ADODB.Recordset

With rs

.ActiveConnection = cn

.CursorLocation = ADODB.CursorLocationEnum.adUseClient

.CursorType = ADODB.CursorTypeEnum.adOpenDynamic

.LockType = ADODB.LockTypeEnum.adLockBatchOptimistic

.Open(mySQL)

End With

Do While Not rs.EOF

Code here finds the value for the string variable ‘atrAdd’

strAdd = New Value

If Not strAdd Is Nothing Then

rs.Fields("location").Value = strAdd

rs.Fields("RevStatus").Value = 1

rs.Update()

else

end if

loop

Regards

Joe

Hi Experts

Have I posted in the wrong forum?

Regards

|||Can you add some code on how you're assigning new value to strAdd?|||Actually, yes you posted in the wrong forum, but nevertheless we will help you. Do you enter the Is Nothing part and the appropiate update or does the execution never touch this portion of the code ? Are you able to send a reproducable class to us ? as from the information you posted the code should be Ok. Did you start the profiler to see wheter the command is executed against the database or could you make sure through debugging that it never enters portion of the code ?

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Hi Experts

Thanks for your response, The variable StrAdd Is a street address which is returned from a mappoint recordset:

StrAdd = objResults.Item(1).Location.StreetAddress.Value

This is returned as a string.

The update portion of the code is only entered If a string value is returned from the mappoint recordset.

Regards,

joe

|||Ok, this is now a bit clearer to me, but did you check the value during debugging time or did you run the profiler ?

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Hi Jens K. Suessmeyer.

Thanks for your response, I had checked the value during debugging. I have had a reply posted on another forum which has provided me with the answer, I appreciate your efforts on my behalf and would not like to waste your time. I have reproduced the reply below, again..

Thank you,

Joe

instead of opening the recordset like so:

rcdSet.Open strSQL, ADO, adOpenForwardOnly, adLockReadOnly, -1

Use this method:

rcdSet.Open strSQL, ADO, adOpenDynamic, adLockBatchOptimistic, -1

Now, after looping through your recordset and changing your values, call:

rcdSet.UpdateBatch

|||Or as an alternative if you want to use Update method and not UpdateBatch - then you can use adLockOptimistic for lock type.