Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Friday, March 30, 2012

Problems instancing Reporting Services

I set up Reporting Services as a Web Reference and when I try to instance it, I get a "type expected" error message. Let's say the web reference is named SQLRS. When I do a DIM rs as NEW SQLRS, a blue squiggly appears under SQLRS and it displays the type expected error message.

What am I missing? Anyone know or have a link to an example I could look at? Thanks for any help.Additional information:

When I bring up the Reporting Services as a web reference, I don't get a drop down list of the methods and properties that are listed in the Add a Web Reference dialogue box and from what I've seen in examples online. For instance, there should be a ListChildren method, but I don't see it when intellisense kicks in.

Example: Let's say I name the web service ReportingService. If I try to instance it by going DIM rs as NEW ReportingService, I get the blue squiggly line complaining that "Type expected". If I type ReportingService. intellisense kicks in, but what appears in the drop down box is not what I expect. There are no ListChildren, ListEvents, ListJobs, etc.

What I suspect is that I need to DIM the ReportingService with one of the selections from the intellisense dropdown box, but I have no idea which one as all the examples I've seen online show differently. Has there been changes to this with service pack 2 that I'm not aware of? Any help would be appreciated.|||Ok, I just love answering my own questions.

It turns out that all the examples I've been trying to follow are a bit off. To create an instance of the Reporting Services as a web service, first add the web service as a web reference to your project. (i.e., right click on references in the solution explorer and type in the web address of the reporting services: http://myserver/ReportServer/ReportService.asmx)

Then, to create an instance, use something like:

DIM rs as NEW ReportingService.ReportingService

Now you will have an object called rs that will have the properties and methods of the ReportingService web service such as ListChildren, ListJobs, Render, etc.

Problems installing SQL7 Desktop on WinXP

I am having great difficulty installing SQL Server 7 Desktop Edition onto WinXP

Pro. The installation proceeds without error until an attempt is made to
configure and then connect to SQL Server, at which point the installation fails and all installed components are removed from the PC. I have tried to install on repeated occasions, always with the same result.

I would be very grateful for any help in solving this problem.

The contents of the CNFGSVR.OUT and ERRORLOG are as below:

CNFGSVR.OUT
===========

Starting Service ...

Connecting to Server ...

driver={sql server};server=.;UID=sa;PWD=;database=master

[Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).

driver={sql server};server=.;UID=sa;PWD=;database=master

[Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (recv()).

driver={sql server};server=DAVIS;UID=sa;PWD=;database=master

[Microsoft][ODBC SQL Server Driver][Shared Memory]General network error. Check your network documentation.

[Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionRead (recv()).

SQL Server configuration failed.

ERRORLOG
========

2003-05-25 23:32:19.09 kernel Microsoft SQL Server 7.00 - 7.00.623 (Intel X86)
Nov 27 1998 22:20:07
Copyright (c) 1988-1998 Microsoft Corporation
Desktop Edition on Windows NT 5.1 (Build 2600: Service Pack 1)

2003-05-25 23:32:19.09 kernel Copyright (C) 1988-1997 MicrosoftCorporation.
2003-05-25 23:32:19.09 kernel All rights reserved.
2003-05-25 23:32:19.09 kernel Logging SQL Server messages in file
'C:\MSSQL7\log\ERRORLOG'.
2003-05-25 23:32:19.12 kernel initconfig: Number of user connections limited to 32767.
2003-05-25 23:32:19.12 kernel SQL Server is starting at priority class
'normal'(1 CPU detected).
2003-05-25 23:32:19.12 kernel User Mode Scheduler configured for thread processing
2003-05-25 23:32:20.17 server Directory Size: 21633
2003-05-25 23:32:20.18 spid1 Using dynamic lock allocation. [500] Lock Blocks, [1000] Lock Owner Blocks
2003-05-25 23:32:20.18 spid1 Warning ******************
2003-05-25 23:32:20.18 spid1 SQL Server started in single user mode. Updates allowed to system catalogs.
2003-05-25 23:32:20.18 spid1 Warning ******************
2003-05-25 23:32:20.18 spid1 Recovering only master database
2003-05-25 23:32:20.18 spid1 Starting up database 'master'.
2003-05-25 23:32:20.18 spid1 Opening file C:\MSSQL7\data\master.mdf.
2003-05-25 23:32:20.20 spid1 Opening file C:\MSSQL7\data\mastlog.ldf.
2003-05-25 23:32:20.26 spid1 Loading SQL Server's Unicode collation.
2003-05-25 23:32:20.28 spid1 Loading SQL Server's non-Unicode sort order and character set.
2003-05-25 23:32:20.40 spid1 4 transactions rolled forward in database 'master' (1).
2003-05-25 23:32:20.40 spid1 0 transactions rolled back in database 'master' (1).
2003-05-25 23:32:20.58 spid1 Server is unnamed.
2003-05-25 23:32:20.58 kernel Using 'SQLEVN70.DLL' version '7.00.623'.
2003-05-25 23:32:20.58 kernel Using 'OPENDS60.DLL' version '7.00.00.0623'.
2003-05-25 23:32:20.59 ods Using 'SSNMPN70.DLL' version '7.0.623' to listen on '\\.\pipe\sql\query'.
2003-05-25 23:32:20.59 ods Using 'SSMSSO70.DLL' version '7.0.623' to listen on '1433'.
2003-05-25 23:32:21.09 ods Using 'SSMSRP70.DLL' version '7.0.623' to listen on 'DAVIS'.
2003-05-25 23:32:21.19 spid1 SQL Server's Unicode collation is:
2003-05-25 23:32:21.19 spid1 'English' (ID = 1033).
2003-05-25 23:32:21.19 spid1 comparison style = 196609.
2003-05-25 23:32:21.19 spid1 SQL Server's non-Unicode sort order is:
2003-05-25 23:32:21.19 spid1 'nocase_iso' (ID = 52).
2003-05-25 23:32:21.19 spid1 SQL Server's non-Unicode character set is:
2003-05-25 23:32:21.19 spid1 'iso_1' (ID = 1).
2003-05-25 23:32:21.20 kernel Warning: override, autoexec procedures skipped.
2003-05-25 23:32:35.88 kernel SQL Server is terminating due to 'stop' request from Service Control Manager.Try downloading latest MDAC from MS Data (http://www.microsoft.com/data) and reinstall again.|||Satya,

I have already downloaded MDAC 2.7 but the install still fails.

It's probably not relevant but if I run Component Checker against version "2.7 SP1(WinXP)" the utility reports the following anomalies:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSDASC\Default Icon
Registry
Field 'Value' mismatch: Expect 'C:\Program Files\Common Files\System\Ole DB\oledb32.dll^0' Got 'C:\WINDOWS\System32\migicons.exe^101'
Error

MSADCO.DLL
COM
Unknown Class ID = {9381d8f1-0288-11d0-9501-00aa00b911a5}
Warning

MSDATT.DLL
COM
Unknown Class ID = {c8b522ce-5cf3-11ce-ade5-00aa0044773d}
Warning|||Refer to dasetup.log files in the windows directory that might shed some light on the problem. You can log MDAC installation by using \MDACSetup\Setup.exe /gc C:\MdacInstalllog.txt

If no avail then make sure those 2 DLLs got registered properly on XP, try reinstall XP with all available SPs.|||Any ideas how I can stop the install removing all components on failure? If I could stop the components being removed I might be able to try starting and configuring the service by hand.|||Remove all reference registry keys and delete the directories during the installation.

Problems installing SQL Reporting Services

I verified that the prerequisites MDAC, ASP, IIS 5 and MSDTC were all
installed, but I'm getting an error duing the install that says:
"IIS is either not installed or not configured for server component
installation"
Any ideas?
Carlton.
I just solved the same issue. Go to Administrative Tools, IIS Manager and
make sure the Default Web site is not stopped. If it is, then Start it and
then the Reporting Services install will not give you this error.
"Cwhitmore" wrote:

> I verified that the prerequisites MDAC, ASP, IIS 5 and MSDTC were all
> installed, but I'm getting an error duing the install that says:
> "IIS is either not installed or not configured for server component
> installation"
> Any ideas?
> Carlton.
>
|||Sunil,
The default website was running. I have serveral virtual directories that
run fine.
Any other ideas?
Carlton.
"Sunil Gulati" wrote:
[vbcol=seagreen]
> I just solved the same issue. Go to Administrative Tools, IIS Manager and
> make sure the Default Web site is not stopped. If it is, then Start it and
> then the Reporting Services install will not give you this error.
> "Cwhitmore" wrote:

Problems installing msde2000a

When i try to install MSDE2000A i get the following error message:
The system cannot open the device or file specified.
Internal error 2755. 110
C:\Msde\Setup\SqlRun01.msi
I start with the following parametres:
DISABLENETWORKPROTOCOLS=0 INSTANCENAME="OpfServer" SAPWD="Opf" SECURITYMODE=SQL
Regards,
Olav
Maybe the media you are installing from is corrupt or the file is missing?
Jim
"Olav" <anonymous@.discussions.microsoft.com> wrote in message
news:BC928DD0-41AC-444E-B211-3A4E7F5800FD@.microsoft.com...
> When i try to install MSDE2000A i get the following error message:
> The system cannot open the device or file specified.
> Internal error 2755. 110
> C:\Msde\Setup\SqlRun01.msi
> I start with the following parametres:
> DISABLENETWORKPROTOCOLS=0 INSTANCENAME="OpfServer" SAPWD="Opf"
SECURITYMODE=SQL
> Regards,
> Olav
|||Hi Jim,
I have just downloaded it from MS and unwrapped it to my harddsisk with the message that it was succesfully delivered. The file SqlRun01.msi is in the Setup directory.
I have uninstalled MS SQL Server 2000 and rebooted after.
Regards,
Olav

Problems installing MSDE

I was in the process of installing the MSDE program when I came upon an error message. Here are the steps I performed to install the MSDE on my computer.

1. Downloaded the program from the Microsoft website.
2. Extracted the files to the "C" directory.
3. Used command prompt to set password and security mode. Rebooted computer after process was completed.
4. To complete the installation, I opened up the setup.exe. However, I got the error message "The instance named specified is invalid" when I opened the program.

Any solutions? (and yes, I already have the Web Matrix and the .Net platorm and am running on Windows 2000 SP4 .)I just finished dealing with this problem myself.

This is what I did and it FINALLY WORKED.

To install the MSDE:

go to the DOS prompt and navigate to C:\sql2ksp3\MSDE (or wherever you unpacked to).

Type this: setup INSTANCENAME="anyname" SECURITYMODE=SQL SAPWD="somepwd"

If you are like me you were thinking "what is the instance name?!". Well in this setup command you are naming it whatever you want, same with the SAPWD. Previously mine was blank (I know this is bad bad bad).

Anyway, once I ran it this way it installed fine!

Good Luck|||Well this may sound really stupid, but I;m a real newbie...

I've read dozens of setup instruction posts..I've started over and done what was suggested in this post, and everything seems to have gone well. SO FAR

Where do I go from here? Do I have to activate the database somehow? Where is this database anyway, after the I run the command, what was installed and where?

The startkit 'congifuration' still fails everytime. Says I don't have either .NET, MSDE, or IIS. I KNOW I have all of this installed..the only weak link could be the MSDE, because I have no idea what is going on with it.

I've installed SQL Server2000 in the past and got to a point where it configured and coulnd fidn the database..

Anyway, are there STEP BY STEP instructions ANYWHERE on this crap. I'm getting sick of reading random posts, web documentation, program documentation, and trying to compile this in to a process to follow..|||As Cheyjey mentioned, use this parameters:
INSTANCENAME="anyname" SECURITYMODE=SQL SAPWD="somepwd"

But you said installed it once, i have to mention that one the major reasons for getting the error you said, is that you have already installed MSDE on your system...|||i mean MSDE SP3a|||And Dear Mickey,

it's not as hard as you say, MSDE is a kind of a server, you can use it either as a server and an interface between applications and SQL Server 2000|||Amins2s,

I've read many post regarding the installation of MSDE, and i'm having the same problems.

I'm new at this and have followed instructions, and am using MSDE for school project.

I have installed VS 2002 Enterprise Architect, then uninstalled it to upgrade to VS 2003
I download the MSDE SP3a service pack from MS, and try to install it.

I'm suppose to use SAPWD=itm and SECURITYMODE=SQL, but upon typing this, i get the speciefed instance is invalid.

How am i suppose to recitfy this. How do i know what the instance i have on it is?

Also you said that you might be getting this error because you have already installed it once before. But i don't remember installing it, since the only thing i have installed is the VS2002 and VS2003, plus the Framework.

If you've installed it once before, how can you correct it so that you can properly install it now?

Even when i go to the MS .net/Frameworksdk/samples/setup/ there is no msde file to execute, which i read from other post should be there.

Thank You.

Nick|||Hello dear Nick,

ok... give this solution a try: do not indicate the SECURITYMODE parameter. Just run it from the Start>Run and use the SAPWD=itm parameter only!
And from the point that my FrameworkSDK doesn't work (the CD is corrupted), unfotunately I can't answer the question.
Please try it and tell me if it worked or not.
If it didn't, then send a feedback (Reply) and this time with more details about your system info...

Problems instaling IIS & Notification Service

I am trying to install SQL server 2005 Developer Edition on a stand alone PC running XP (service pack 2). I have the below error messages preventing me installing Notification Services and Intergration Services ( looks like the same problem for both ). I followed the advice to check the 'Distributed TransactionCoordinator' in services, all setting were correct. I stopped amd restarted the service and selected "retry' to no avail. Any ideas anyone?

Messages:

TITLE: Microsoft SQL Server 2005 Setup

Failed to install and configure assemblies C:\Program Files\Microsoft SQL Server\90\DTS\Tasks\Microsoft.SqlServer.MSMQTask.dll in the COM+ catalog. Error: -2147024894

Error message: The system cannot find the file specified.

Error description: Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=29549&EvtType=sqlca%5csqlassembly.cpp%40Do_sqlAssemblyRegSvcs%40Do_sqlAssemblyRegSvcs%40x80070002

BUTTONS:

&Abort

&Retry

&Ignore

TITLE: Microsoft SQL Server 2005 Setup

Failed to install and configure assemblies C:\Program Files\Microsoft SQL Server\90\NotificationServices\9.0.242\Bin\microsoft.sqlserver.notificationservices.dll in the COM+ catalog. Error: -2147024894

Error message: The system cannot find the file specified.

Error description: Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=29549&EvtType=sqlca%5csqlassembly.cpp%40Do_sqlAssemblyRegSvcs%40Do_sqlAssemblyRegSvcs%40x80070002

BUTTONS:

&Abort

&Retry

&Ignore

Thanks in advance

ADG

can you try to reinstall .NET Framework 2.0 and then try the setup again?

You can find x86 vesrion of .NET 2.0 redistributable at: http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en

The page also contains links to x64 and ia64 versions at the bottom.

|||

Many thanks Jin

I downloaded .net 2.0 as suggested, and selected repair. Service loaded fine afterwards

Wednesday, March 28, 2012

Problems Inserting DateTimeStamp into database

Here's the error I get trying to run the code posted below..."Prepared statement '(@.datestamp datetime,@.PrevValue real,@.NewValue real,@.IPaddress r' expects parameter @.datestamp, which was not supplied."

I've tried it without the quotes around the DateTime.Now and also adding the # around them. Without the quotes, I do get a different error because it doesn't like the spaces in the DateTime text. Also, the datestamp data in the database is formatted as a datetime (MS SQL Server 2005).

Here's my code:

PrivateSub UpdateRefresh()

UpdateConnection.Open()

UpdateDataAdapter.InsertCommand.CommandText = "INSERT INTO dbo.tbDeploy(datestamp," & _

"PrevValue, NewValue, IPaddress, HighCapability, LowCapability, Share) VALUES" & _

"('" & DateTime.Now & "', '" & lblCurrent.Text & "', '" & lblCurrent.Text & _

"', '" & lblIP.Text & "', '" & lblHigh.Text & "', '" & lblLow.Text & "', '" & lblShare.Text & "')"

UpdateDataAdapter.InsertCommand.ExecuteNonQuery()

UpdateConnection.Close()

EndSub

Use parameterized queries. Your problem will be solved. You can also prevent SQL Injection attacks.

Problems insalling SP3

Hi everyone,
I was installing the SP3 to the RTM version of the SQL SERVER 2000 and
during that process an error ocurred:
"Error running script: sp3_serv_uni.sql(1)"
When I clicked on the ok button the setup shut off and I tried to
restart the service (I stopped it before begining installation) but i
couldn't, so i restarted the computer and everything seemed normal.
What should i do? should i try to reinstall SP3?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!I had this problem. I had to enable only named pipes in the enabled
protocols of the SQL server network utility and the SQL client network
utility and after the install enabled TCP/IP again. It may work with a
combination, but that is how I got around it (not my brilliance, I found it
with a google search somewhere).
<anonymous@.devdex.com> wrote in message
news:#wYJSMpdEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi everyone,
> I was installing the SP3 to the RTM version of the SQL SERVER 2000 and
> during that process an error ocurred:
> "Error running script: sp3_serv_uni.sql(1)"
> When I clicked on the ok button the setup shut off and I tried to
> restart the service (I stopped it before begining installation) but i
> couldn't, so i restarted the computer and everything seemed normal.
> What should i do? should i try to reinstall SP3?
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Problems insalling SP3

Hi everyone,
I was installing the SP3 to the RTM version of the SQL SERVER 2000 and
during that process an error ocurred:
"Error running script: sp3_serv_uni.sql(1)"
When I clicked on the ok button the setup shut off and I tried to
restart the service (I stopped it before begining installation) but i
couldn't, so i restarted the computer and everything seemed normal.
What should i do? should i try to reinstall SP3?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!I had this problem. I had to enable only named pipes in the enabled
protocols of the SQL server network utility and the SQL client network
utility and after the install enabled TCP/IP again. It may work with a
combination, but that is how I got around it (not my brilliance, I found it
with a google search somewhere).
<anonymous@.devdex.com> wrote in message
news:#wYJSMpdEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi everyone,
> I was installing the SP3 to the RTM version of the SQL SERVER 2000 and
> during that process an error ocurred:
> "Error running script: sp3_serv_uni.sql(1)"
> When I clicked on the ok button the setup shut off and I tried to
> restart the service (I stopped it before begining installation) but i
> couldn't, so i restarted the computer and everything seemed normal.
> What should i do? should i try to reinstall SP3?
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Problems insalling SP3

Hi everyone,
I was installing the SP3 to the RTM version of the SQL SERVER 2000 and
during that process an error ocurred:
"Error running script: sp3_serv_uni.sql(1)"
When I clicked on the ok button the setup shut off and I tried to
restart the service (I stopped it before begining installation) but i
couldn't, so i restarted the computer and everything seemed normal.
What should i do? should i try to reinstall SP3?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
I had this problem. I had to enable only named pipes in the enabled
protocols of the SQL server network utility and the SQL client network
utility and after the install enabled TCP/IP again. It may work with a
combination, but that is how I got around it (not my brilliance, I found it
with a google search somewhere).
<anonymous@.devdex.com> wrote in message
news:#wYJSMpdEHA.4092@.TK2MSFTNGP10.phx.gbl...
> Hi everyone,
> I was installing the SP3 to the RTM version of the SQL SERVER 2000 and
> during that process an error ocurred:
> "Error running script: sp3_serv_uni.sql(1)"
> When I clicked on the ok button the setup shut off and I tried to
> restart the service (I stopped it before begining installation) but i
> couldn't, so i restarted the computer and everything seemed normal.
> What should i do? should i try to reinstall SP3?
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

Problems Initializing Reporting Serivices

We are trying to install Reporting Services on a server and we are getting
this error.
ReportServicesConfigUI.WMIProvider.WMIProviderException: The version does
not match a supported version.
at
ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.GenerateDatabaseUpgradeScript(String databaseName, String serverVersion, String& script)
just to be sure, it that mean the version of SQL Server we have will not
allow Reporting services to be installed or is it something else that cause
the error?
We have SQL Server Enterprise 64x.On Dec 13, 9:02 am, Ben <B...@.discussions.microsoft.com> wrote:
> We are trying to install Reporting Services on a server and we are getting
> this error.
> ReportServicesConfigUI.WMIProvider.WMIProviderException: The version does
> not match a supported version.
> at
> ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.GenerateDatabaseUpgradeScript(String databaseName, String serverVersion, String& script)
> just to be sure, it that mean the version of SQL Server we have will not
> allow Reporting services to be installed or is it something else that cause
> the error?
> We have SQL Server Enterprise 64x.
It seems like your SQL Server version is different than your SSRS
version. This link might help. http://207.46.236.188/MSDN/ShowPost.aspx?PostID=2294611&SiteID=1
Regards,
Enrique Martinez
Sr. Software Consultant|||Are you trying to do a fresh install of Reporting Services or are you just
now trying to configure it?
If you are trying to configure it make sure that when you installed SRS
from the SQL Server 2005 media that you re-applied any service packs that
you put on SQL Server 2005 before installing Reporting Services. This can
happen when the current installation is at an SP1 or SP2 level yet the
installed files from SRS are at an RTM level.
If it is a "Fresh" install of SRS see if you can select the radio button
that says "Configure Later" rather than the "Common Configuration" button.
This will allow you to do all of the configuration steps after SRS has
installed. This will allow you to apply any SPs necessary before you try
and configure SRS.
Also, if you are trying to upgrade an instance of SQL Server 2000 SRS you
can always upgrade the database AFTER you have installed 2005 SRS. You
don't have to upgrade the existing instance of SRS all you actually need is
the database. Just make sure you exported the encryption key for the
database from the old SRS 2000 instance before doing that. (You can do this
by using the rskeymgmt tool in the 80\tools\binn folder. Just do a
rskeymgmt -? and look for the key export example)
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> Thread-Topic: Problems Initializing Reporting Serivices
>
> We are trying to install Reporting Services on a server and we are
getting
> this error.
> ReportServicesConfigUI.WMIProvider.WMIProviderException: The version does
> not match a supported version.
> at
>
ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.GenerateDatabaseUpgra
deScript(String databaseName, String serverVersion, String& script)
> just to be sure, it that mean the version of SQL Server we have will not
> allow Reporting services to be installed or is it something else that
cause
> the error?
> We have SQL Server Enterprise 64x.
>sql

problems in editing a record... why? help pls....

can someone help me why it produces an error...

error is: ERROR 22001 Microsoft ODBC SQL Server Driver SQL Server STRING or data of BINARY was cut short.
ERROR 01000 Microsoft ODBC SQL Server Driver SQL Server statement was ended.

This is my code here for editing a record...

Protected Sub Button_save2_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button_save2.Click
'||||| Create string connection
Dim StrConn As String = "Dsn=MS_PKG01;UID=emiline;APP=Microsoft? Visual Studio? 2005;WSID=MSHNP200603;DATABASE=MS_PKG01;Trusted_Connection=Yes"
'||||| Create connection object
Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)

'||||| Open connection
MyConn.Open()

'|||| Create odbcCommand object
Dim Update_record As New Odbc.OdbcCommand("UPDATE TM0001 SET TM0001.syain_name = ?, TM0001.syain_pass = ?, TM0001.office_id = ?, TM0001.birth_date = ?, TM0001.empl_date = ?, TM0001.user_iden = ? ", MyConn)

Dim hireYear As String
Dim hireMonth As String
Dim hireDay As String
Dim date_hire As String

hireYear = DropDownList_hire_yr.Text
hireMonth = DropDownList_hire_mo.Text
hireDay = DropDownList_hire_day.Text

date_hire = hireYear + "/" + hireMonth + "/" + hireDay

'|||| Add command parameters
Update_record.Parameters.Add("@.P1", OdbcType.Char, 8).Value = TextBox_id.Text
Update_record.Parameters.Add("@.P2", OdbcType.Char, 20).Value = TextBox_name.Text
Update_record.Parameters.Add("@.P3", OdbcType.Char, 20).Value = TextBox_pswd.Text
Update_record.Parameters.Add("@.P3", OdbcType.Char, 40).Value = DropDownList_office.SelectedValue
Update_record.Parameters.Add("@.P3", OdbcType.Char, 2).Value = date_hire
Update_record.Parameters.Add("@.P3", OdbcType.Char, 10).Value = TextBox_bday.Text
Update_record.Parameters.Add("@.P3", OdbcType.Char, 1).Value = DropDownList_iden.SelectedValue

'|||| Execute command
Update_record.ExecuteNonQuery()

'|||| Close connection
MyConn.Close()
End Sub
End Class

I modify some codes already but still same error...

my code:

'||||| Create connection object
Dim MyConn As Odbc.OdbcConnection = New Odbc.OdbcConnection(StrConn)

'|||| Create odbcCommand object
Dim Update_record As New Odbc.OdbcCommand("UPDATE TM0001 SET TM0001.syain_name = ?, TM0001.syain_pass = ?, TM0001.office_id = ?, TM0001.birth_date = ?, TM0001.empl_date = ?, TM0001.user_iden = ? where syain_id = ? ", MyConn)

id_user = TextBox_id.Text
name = TextBox_name.Text
pass = TextBox_pswd.Text
office_id = DropDownList_office.SelectedValue
bday = TextBox_bday.Text
iden = DropDownList_iden.SelectedValue

hireYear = DropDownList_hire_yr.Text
hireMonth = DropDownList_hire_mo.Text
hireDay = DropDownList_hire_day.Text

date_hire = hireYear + "/" + hireMonth + "/" + hireDay

'|||| Add command parameters

Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = name
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = pass
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = office_id
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = date_hire
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = bday
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = iden
Update_record.Parameters.Add("@.P1", OdbcType.Char).Value = id_user


'||||| Open connection
MyConn.Open()

'|||| Execute command
Update_record.ExecuteNonQuery()

'|||| Close connection
MyConn.Close()

|||

Hi,

i think a textfield has more data as permitted, so the update command crashed. You can inspect the prepared SQLCommand inside the Update_record object and try to execute this command direct in the database (Query Analyzer or Database Command Prompt Interface).

Regards
Marc Andre

|||

hmmm i already check it and there is nothing wrong...

and whenever i input a new record it always satisfy the condition in the data type...

but still i dont why when i edit it generates error in my code...

hmmm another thing that i observe in my code is that when

i click the save button when editing it doesnt change anything...but the first record or the initial record always shows...

i tried putting is postback but nothing happens...

everytime i press the save button to saved my changes in the data the initial entry shows...

coz in my pageload the initial entry or the first record in the dabse is shown...

hmmm what do u think?

Monday, March 26, 2012

Problems exporting to Excel

I am getting the following error message when I try to export to mulitple sheets (running 2000)

Excel Rendering Extension : Width of excel cell in the excel sheet exceeded the max limit of 1726.5 points.

If I take each the matrix out, it works ok. If I put the matrix back in, and take out the table it also works ok, it is only when I try to go both.

Does the matrix or table have a very wide column? Is there a large horizontal space between them? The Excel has to map the structures to cells in Excel. These cells have maximum widths that cannot be exceeded.

If you post your RDL, I might be able to offer more specific guidance.

|||How do I post the rdl.

Problems exporting to Excel

I am getting the following error message when I try to export to mulitple sheets (running 2000)

Excel Rendering Extension : Width of excel cell in the excel sheet exceeded the max limit of 1726.5 points.

If I take each the matrix out, it works ok. If I put the matrix back in, and take out the table it also works ok, it is only when I try to go both.

Does the matrix or table have a very wide column? Is there a large horizontal space between them? The Excel has to map the structures to cells in Excel. These cells have maximum widths that cannot be exceeded.

If you post your RDL, I might be able to offer more specific guidance.

|||How do I post the rdl.sql

Problems deleting SQL.LOG file

Hi,

I can not delete this file from C/Windows/Temp directory, all other files form that foder I can delete. The error message I get is that something else is using this file. The thing is I cant find what is using it, even though I uninstaled SQL Server 2005 completely. I have tried lots of things, nothing helps. At the end I entered windows in SAFE MODE, went to Computer Management and disabled almost every service I can, that might be using it, and still cant get rid of this SQL.LOG which is 26GB now. The only thing I could do is to compress the file and now it is 6.5GB.

Txs for the help..

This file is a result of ODBC tracing. Here's the article about how to delete it.

http://support.microsoft.com/kb/268591

Thanks,
Sam Lester (MSFT)

Friday, March 23, 2012

Problems creating Error File when using Bulk Insert or BCP from xp_cmdshell.

BCP thru xp_cmdshell from stored procedure:

EXEC sp_configure 'show advanced options', 1;

RECONFIGURE

EXEC sp_configure 'xp_cmdshell', 1;

RECONFIGURE

EXEC xp_cmdshell 'bcp database.dbo.table in c:\scheduled.csv -S SERVER\SQLEXPRESS -T -t, -r\n -c -e "error.txt"';

This is returning the following error code. I even tried placing the command in a seperate command file and calling that with no success. If I run this from the command line the error file generation does work.

=================================================================

SQLState = HY000, NativeError = 0

Error = [Microsoft][SQL Native Client]Unable to open BCP error-file

=================================================================

Error message when using BULK INSERT as follows:

BULK INSERT database.dbo.table from 'c:\unscheduled.csv' with

(FIELDTERMINATOR = ',', ERRORFILE = 'c:\error.txt');

Returns the following error message:

=================================================================

Msg 4861, Level 16, State 1, Procedure pro_cedure, Line 9

Cannot bulk load because the file "c:\error.txt" could not be opened. Operating system error code 80(The file exists.).

Msg 4861, Level 16, State 1, Procedure pro_cedure, Line 9

Cannot bulk load because the file "c:\error.txt.Error.Txt" could not be opened. Operating system error code 80(The file exists.).

=================================================================

The Bulk Insert actually creates a empty error.txt file (0kb) and never preforms the insert, I can not find any examples of anyone using the -ERRORFILE switch on BULK INSERT. Prolly some default security setting to allow file creation/modification I am missing. Anyone help me out? Thanks.

EDIT: SQL SERVER EXPRESS 2005 - WINXP PRO SP2

I had this error too. It looks like a bug as BULK INSERT works fine without the -ERRORFILE option. It seems that the execution of the BULK INSERT first creates the file without closing it which results in the error message afterwards. As Workaround just don't use the option

Nobsay

Wednesday, March 21, 2012

Problems connecting to MSDE from client.

Error message: SQL Server not found or access denied.
We have installed our SW on a network with 8 clients. I runs fine on all but
1 client. This client is running Win 2000 and has 3 network cards installed
to be shared by 3 networks.
We use SQL auth. I have run CLICONFG on the client and enabled Names pipes
and TCP as they are on the server with the same port nr.. Our SW loads
correctly from the server so there is connection. I have also pinged the
server.
Olav
hi Olav,
Olav wrote:
> Error message: SQL Server not found or access denied.
> We have installed our SW on a network with 8 clients. I runs fine on
> all but 1 client. This client is running Win 2000 and has 3 network
> cards installed to be shared by 3 networks.
> We use SQL auth. I have run CLICONFG on the client and enabled Names
> pipes and TCP as they are on the server with the same port nr.. Our
> SW loads correctly from the server so there is connection. I have
> also pinged the server.
>
please have a look at
http://support.microsoft.com/default...06&Product=sql
in the client-related causes..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
sql

problems connecting to DB.

Hi,

thats what i get when running the app:

Server Error in '/Jobs5' Application.

Unable to open the physical file "C:\MPDB\ManPower.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
An attempt to attach an auto-named database for file C:\MPDB\ManPower.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

Nothing seems to be using that file. So what is the problem?

Thanks.

The problem is that the DB is being used by the default web server of VS2005 whule i am trying to access using IIS.

the qu. is how do i make my application use IIS insted?

Thanks.

Problems configuring Execution Log Reports

I receive the following error:
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Cannot create a connection to data source 'RSExecutionLog'.
(rsErrorOpeningConnection) Get Online Help
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
My ReportServer DB is separate from my ReportServer IIS boxes, I'm trying to
use Windows NT Integrated Security to access the Execution Log. I'm a Local
Admin of both servers but still receive the error.
Am I dealing with a permissions hop issue? Any suggestions would help.
DavidYes. Use stored credentials in the shared data source for the reports
(another slightly more complex option would be to use Kerberos delegation)
--
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
"David Dubay" <DavidDubay@.discussions.microsoft.com> wrote in message
news:30C3BBF3-5DE7-4F4E-9008-349CA172D6EC@.microsoft.com...
>I receive the following error:
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> Cannot create a connection to data source 'RSExecutionLog'.
> (rsErrorOpeningConnection) Get Online Help
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> My ReportServer DB is separate from my ReportServer IIS boxes, I'm trying
> to
> use Windows NT Integrated Security to access the Execution Log. I'm a
> Local
> Admin of both servers but still receive the error.
> Am I dealing with a permissions hop issue? Any suggestions would help.
> David

Problems catching @@error from trigger on insert from openxml

Have kind of an oddball scenario that needs a solution.
I have a stored proc which is passed XML that pulls out sections of the xml
for inserts into 3 different tables.
The first insert has an "instead of" trigger that on rare occasions raises
an error.
After that first insert (using an "insert into ... select * from openxml"
form) I need to know if that error was raised. Testing @.@.ERROR always gives
me 0.
Is this an issue with the openxml insert form?
What I would like to do is rollback a transaction if any of the inserts fail.Just put all the 3 inserts in a transaction with
BEGIN TRANSACTION
INSERT 1
IF @.@.TRANCOUNT > 0
INSERT 2
IF @.@.TRANCOUNT > 0
INSERT 3
IF @.@.TRANCOUNT > 0
COMMIT TRANSACTION
An error (any error) in a trigger will terminate and rollback the
transaction that fired it. The thing you want to avoid to do after that is
so the next inserts. The code above will give you some control over the
exact execution, but if you don't need that, you can use SET XACT_ABORT ON
before you start the transaction, and no code will be executed in the batch
after an error is encountered.
You probably don't see any value for @.@.ERROR because you don't check it
immediately after the statement that raises the error (easy mistake to
make).
For some more background information read these excellent articles by SQL
Server MVP Erland Sommarskog:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
--
Jacco Schalkwijk
SQL Server MVP
"D.Kratt" <DKratt@.discussions.microsoft.com> wrote in message
news:7EFFB116-37E6-4188-8500-2846C5233AEA@.microsoft.com...
> Have kind of an oddball scenario that needs a solution.
> I have a stored proc which is passed XML that pulls out sections of the
> xml
> for inserts into 3 different tables.
> The first insert has an "instead of" trigger that on rare occasions raises
> an error.
> After that first insert (using an "insert into ... select * from openxml"
> form) I need to know if that error was raised. Testing @.@.ERROR always
> gives
> me 0.
> Is this an issue with the openxml insert form?
> What I would like to do is rollback a transaction if any of the inserts
> fail.|||Tried both (thanks for the suggestions, eventually got me to a solution),
but didn't work until I placed an explicit ROLLBACK TRANSACTION right before
my raiseerror in the insert trigger on the first table.
"Jacco Schalkwijk" wrote:
> Just put all the 3 inserts in a transaction with
> BEGIN TRANSACTION
> INSERT 1
> IF @.@.TRANCOUNT > 0
> INSERT 2
> IF @.@.TRANCOUNT > 0
> INSERT 3
> IF @.@.TRANCOUNT > 0
> COMMIT TRANSACTION
> An error (any error) in a trigger will terminate and rollback the
> transaction that fired it. The thing you want to avoid to do after that is
> so the next inserts. The code above will give you some control over the
> exact execution, but if you don't need that, you can use SET XACT_ABORT ON
> before you start the transaction, and no code will be executed in the batch
> after an error is encountered.
> You probably don't see any value for @.@.ERROR because you don't check it
> immediately after the statement that raises the error (easy mistake to
> make).
> For some more background information read these excellent articles by SQL
> Server MVP Erland Sommarskog:
> http://www.sommarskog.se/error-handling-I.html
> http://www.sommarskog.se/error-handling-II.html
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "D.Kratt" <DKratt@.discussions.microsoft.com> wrote in message
> news:7EFFB116-37E6-4188-8500-2846C5233AEA@.microsoft.com...
> > Have kind of an oddball scenario that needs a solution.
> >
> > I have a stored proc which is passed XML that pulls out sections of the
> > xml
> > for inserts into 3 different tables.
> >
> > The first insert has an "instead of" trigger that on rare occasions raises
> > an error.
> > After that first insert (using an "insert into ... select * from openxml"
> > form) I need to know if that error was raised. Testing @.@.ERROR always
> > gives
> > me 0.
> >
> > Is this an issue with the openxml insert form?
> >
> > What I would like to do is rollback a transaction if any of the inserts
> > fail.
>
>