Thursday, March 29, 2012
Error 18456 Severity 14 State 16
viewer:
03/16/2007 07:56:00,Logon,Unknown,Login failed for user
'CTPC\Administrator'. [CLIENT: <local machine>]
03/16/2007 07:56:00,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 1
6.
0000: 18 48 00 00 0e 00 00 00 .H.....
0008: 09 00 00 00 49 00 4e 00 ...I.N.
0010: 54 00 52 00 41 00 4e 00 T.R.A.N.
0018: 45 00 54 00 00 00 07 00 E.T....
0020: 00 00 6d 00 61 00 73 00 ..m.a.s.
0028: 74 00 65 00 72 00 00 00 t.e.r...
I have tried figure out what process is trying to hit this database but to
no avail, how should I go about troubleshooting this? It logs this every on
e
minute and it is on our Portal server.
Thanks,
RobYou can run a trace or Profiler when a login fails and see
what shows up for the application name when auditing the
Login Failures.
It's on the same box as SQL Server so you could also check
what services may be running under the local administrator
account.The security logs may have more information as well
if you track the logins and details for the logins.
-Sue
On Fri, 16 Mar 2007 06:02:16 -0700, Rob
<Rob@.discussions.microsoft.com> wrote:
>I am getting the following error in my Sql logs and in my Application Event
>viewer:
>03/16/2007 07:56:00,Logon,Unknown,Login failed for user
>'CTPC\Administrator'. [CLIENT: <local machine>]
>03/16/2007 07:56:00,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State:
16.
>0000: 18 48 00 00 0e 00 00 00 .H.....
>0008: 09 00 00 00 49 00 4e 00 ...I.N.
>0010: 54 00 52 00 41 00 4e 00 T.R.A.N.
>0018: 45 00 54 00 00 00 07 00 E.T....
>0020: 00 00 6d 00 61 00 73 00 ..m.a.s.
>0028: 74 00 65 00 72 00 00 00 t.e.r...
>I have tried figure out what process is trying to hit this database but to
>no avail, how should I go about troubleshooting this? It logs this every o
ne
>minute and it is on our Portal server.
>Thanks,
>Rob
Error 18456 Login failed for user domain\user
service packs and critical updates are current on the server and clients.
SQL Server uses mixed authentification and runs under a domain account, the
users login with their domain\username, or at least they used to. Nobody
seems to know exactly when this stopped working, and of course, nobody said
anything until this week. Attempting to login now fails with error 18456
login failed for user domain\username. I've foolwed all the debugging info I
can find on Microsofts site. Running osql, I can log in using windows
authentification and SQL Server accounts with no problem. Trying to use
domain\username fails. I've been through everything from DNS to SQL Server
settings to client settings with no resolution. Anybody have an idea where
else to look?
Any hints would be greatly appreciated.
BruceHi Bruce,
Thank you for use the newsgroup and it is my pleasure to help you with you
issue.
From you information, you application, which used to work fine now got
error message
Could you check if the ODBC connection is made through the standard
security of SQL Server of trusted connection security? Is the SQL Server
authentication mode match the security option of ODBC connection? Could you
using the Query Analyzer to connect the SQL Server? That is, if you use the
standard security, such as use the account 'sa', when using 'sa' in Query
Analyzer, could it connect the SQL Server. When it is a Windows
authentication, when connect the SQL Server by Query Analyzer, you should
choose the Windows Authenticatin in the Query Analyzer.
Looking forward to your response. Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Baisong:
Using Windows Authentification or Sql Server Authentification both work
fine.
If I'm logged into the domain I can run
osql -S SERVER -d Test -E
or
osql -S SERVER -d Test -U SA -P password
with no problem I can connect through Query analyzer either way.
if I try
osql -S SERVER -d Test -U domain\username -P password
it fails with the message Error 18456 Login failed for user domain\username.
The application we are using was working with the domain\username login, I
can't use Windows Integrated security with it, and I really do not want to
setup and manage 50+ SQL Server accounts. I am assuming that something has
changed in the authentification / delegation process and am working through
that now. As far as I can tell nothing has changed, but obviously something
has.
Any ideas would be appreciated.
Bruce
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:EKzqmHs7DHA.1992@.cpmsftngxa07.phx.gbl...
> Hi Bruce,
> Thank you for use the newsgroup and it is my pleasure to help you with you
> issue.
> From you information, you application, which used to work fine now got
> error message
> Could you check if the ODBC connection is made through the standard
> security of SQL Server of trusted connection security? Is the SQL Server
> authentication mode match the security option of ODBC connection? Could
you
> using the Query Analyzer to connect the SQL Server? That is, if you use
the
> standard security, such as use the account 'sa', when using 'sa' in Query
> Analyzer, could it connect the SQL Server. When it is a Windows
> authentication, when connect the SQL Server by Query Analyzer, you should
> choose the Windows Authenticatin in the Query Analyzer.
> Looking forward to your response. Thanks.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>|||Hi Bruce,
Thank you for your update.
For the 'osql -S SERVER -d Test -U domain\username -P password' which
failed with the error message, could you check if it is a valid SQL Server
login? You could check it by unfolder the database, unfoulder the
'Security', then in the logins, is the above 'domain\username' in the
logins?
Looking forward to your response. Thanks.
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.|||Yes, it is a valid login and the password is correct. The account also has
privledges (dbowner + our SQL_Admin role) to access the test database. It
works fine with Windows Integrated Security, so I don't think it is related
to SQL Server privledges, my guess is that something has changed in the
authentification authorization or delegation between the domain and the
server or the client.
The client computers are running MDAC 2.8 or 2.7RTM, and component checker
says they are current and all is well. Servers and clients are current on
patches, SQL Server is current. I've been throgh every article I can find on
MSDN that remotely deals with this error, and everything seems to check out.
I'm sure there is some little thing I'm overlooking, but I'm totally stumped
at this point.
Bruce
"Baisong Wei[MSFT]" <v-baiwei@.online.microsoft.com> wrote in message
news:ZZofg867DHA.2508@.cpmsftngxa07.phx.gbl...
> Hi Bruce,
> Thank you for your update.
> For the 'osql -S SERVER -d Test -U domain\username -P password' which
> failed with the error message, could you check if it is a valid SQL Server
> login? You could check it by unfolder the database, unfoulder the
> 'Security', then in the logins, is the above 'domain\username' in the
> logins?
> Looking forward to your response. Thanks.
> Best regards
> Baisong Wei
> Microsoft Online Support
> ----
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>|||Bruce,
The exact same thing happen here - ODBC connections that had worked
stopped working. We THINK it was related to installing patches but not
the full SP3a running on SQL 2000. We know installing SP3a fixed it.
An easy test to see if it's the same problem - in the ODBC config, set
the server name servername.subdomain.domain.?, check with the network
people for the full name if you need to.
If it works then maybe install/reinstall SP3a on the server will help.
SQL DBA in Richmond, VA
PS - I know 4 locales that suddenly experienced this same problem.
Maybe triggered by Windows critical update?
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Error 18456 - Connecting via DSN
My MS Access application needs to connect to a SQL server via a system
dsn. However, I keep getting the error 18456 - Login failed for user 'xxxx'.
The surprising bit is I am able to use the same password and user id and
connect to the server using Enterprise Manager. Any ideas on why the dsn is
throwing this error? Connection is via SQL authentication.
Any help would be much appreciated.
Rgds,
San
Any success with this? I'm having the exact same problem. I was doing
some permissions stuff the other day so I'm sure I hosed something up.
goosesr
Posted via http://www.codecomments.com
|||Yeah, I was able to resolve the issue by updating the links in Access. Right
click on the link table, select Link Table Manager, select, promt for new
location,a nd on ok, select the DSN again...
Hope it works for you too !
~San
"goosesr" wrote:
> Any success with this? I'm having the exact same problem. I was doing
> some permissions stuff the other day so I'm sure I hosed something up.
>
> --
> goosesr
> Posted via http://www.codecomments.com
>
Error 18456 - Connecting via DSN
My MS Access application needs to connect to a SQL server via a system
dsn. However, I keep getting the error 18456 - Login failed for user 'xxxx'.
The surprising bit is I am able to use the same password and user id and
connect to the server using Enterprise Manager. Any ideas on why the dsn is
throwing this error? Connection is via SQL authentication.
Any help would be much appreciated.
Rgds,
SanAny success with this? I'm having the exact same problem. I was doing
some permissions stuff the other day so I'm sure I hosed something up.
goosesr
---
Posted via http://www.codecomments.com
---|||Yeah, I was able to resolve the issue by updating the links in Access. Right
click on the link table, select Link Table Manager, select, promt for new
location,a nd on ok, select the DSN again...
Hope it works for you too !
~San
"goosesr" wrote:
> Any success with this? I'm having the exact same problem. I was doing
> some permissions stuff the other day so I'm sure I hosed something up.
>
> --
> goosesr
> ---
> Posted via http://www.codecomments.com
> ---
>
Monday, March 26, 2012
Error 17805
Occassionaly the application displays a "Severe Error Occured" message when
trying to execute a command against the DB.
The SQL Logs show "Error 17805 - Invalid buffer received from client" has
anyone any idea what this means?
We did not write the application so we have no way of knowing what it's
trying to do other than insert data into the database.
Thanks, for any help
BrianHi,
Normally this error occurs due to Network problems and are not critical at
all.
Please look in to the below link for more details;
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=0a0801c3
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/groups%3Fq%3D17805%2Bin%2B
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D0a0801c366
fc%2524f930e9f0%2524a401280a%2540phx.gbl%26rnum%3D6
Thanks
Hari
MCDBA
"Brian" <bfordSPAMOFF@.markem.com> wrote in message
news:#cUCzil6DHA.1852@.TK2MSFTNGP10.phx.gbl...
> We have an application that is using our SQL Server 2000 as a repository.
> Occassionaly the application displays a "Severe Error Occured" message
when
> trying to execute a command against the DB.
> The SQL Logs show "Error 17805 - Invalid buffer received from client" has
> anyone any idea what this means?
> We did not write the application so we have no way of knowing what it's
> trying to do other than insert data into the database.
> Thanks, for any help
> Brian
>|||Hari,
Thanks for the response, unfortunately I know the network is not the
problem, and whilst this is not causing any issues on the SQL DB, it is
critical as far as the application is concerned as it doesn't work :(
I have check MS KB and I have the latest SP installed, I have an identical
setup on another box and everything is working fine.
Any other clues?
Thanks again for your input
Brian
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:uFYF7ol6DHA.2404@.TK2MSFTNGP11.phx.gbl...
> Hi,
> Normally this error occurs due to Network problems and are not critical
at
> all.
> Please look in to the below link for more details;
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=0a0801c3
>
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/groups%3Fq%3D17805%2Bin%2B
>
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D0a0801c366
> fc%2524f930e9f0%2524a401280a%2540phx.gbl%26rnum%3D6
> Thanks
> Hari
> MCDBA
>
> "Brian" <bfordSPAMOFF@.markem.com> wrote in message
> news:#cUCzil6DHA.1852@.TK2MSFTNGP10.phx.gbl...
> > We have an application that is using our SQL Server 2000 as a
repository.
> > Occassionaly the application displays a "Severe Error Occured" message
> when
> > trying to execute a command against the DB.
> >
> > The SQL Logs show "Error 17805 - Invalid buffer received from client"
has
> > anyone any idea what this means?
> >
> > We did not write the application so we have no way of knowing what it's
> > trying to do other than insert data into the database.
> >
> > Thanks, for any help
> >
> > Brian
> >
> >
>|||Hi,
From the same machine, Did you tried connecting to SQL server using Query
Analyzer with TCP/IP as well as Named pipes seperately ?.
Thanks
Hari
MCDBA
"Brian" <bfordSPAMOFF@.markem.com> wrote in message
news:#FFbR1l6DHA.2488@.TK2MSFTNGP09.phx.gbl...
> Hari,
> Thanks for the response, unfortunately I know the network is not the
> problem, and whilst this is not causing any issues on the SQL DB, it is
> critical as far as the application is concerned as it doesn't work :(
> I have check MS KB and I have the latest SP installed, I have an identical
> setup on another box and everything is working fine.
> Any other clues?
> Thanks again for your input
> Brian
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:uFYF7ol6DHA.2404@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > Normally this error occurs due to Network problems and are not critical
> at
> > all.
> >
> > Please look in to the below link for more details;
> >
> >
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=0a0801c3
> >
>
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/groups%3Fq%3D17805%2Bin%2B
> >
>
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D0a0801c366
> > fc%2524f930e9f0%2524a401280a%2540phx.gbl%26rnum%3D6
> >
> > Thanks
> > Hari
> > MCDBA
> >
> >
> >
> > "Brian" <bfordSPAMOFF@.markem.com> wrote in message
> > news:#cUCzil6DHA.1852@.TK2MSFTNGP10.phx.gbl...
> > > We have an application that is using our SQL Server 2000 as a
> repository.
> > > Occassionaly the application displays a "Severe Error Occured" message
> > when
> > > trying to execute a command against the DB.
> > >
> > > The SQL Logs show "Error 17805 - Invalid buffer received from client"
> has
> > > anyone any idea what this means?
> > >
> > > We did not write the application so we have no way of knowing what
it's
> > > trying to do other than insert data into the database.
> > >
> > > Thanks, for any help
> > >
> > > Brian
> > >
> > >
> >
> >
>|||I can connect to it just fine, the application that I am having trouble with
is located on a seperate server and, for the most part, has no trouble
connecting to the DB. It's just certain screens that fail with this error.
The SQL Server itself is serving many applications on our network connecting
via TCP and Named Pipes, it's just this one app that is giving us a problem.
I think it's time to get in touch with application vendor to find out what
sort of command it's trying to execute.
Thanks,
Brian
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:e2LqXLn6DHA.1752@.tk2msftngp13.phx.gbl...
> Hi,
> From the same machine, Did you tried connecting to SQL server using Query
> Analyzer with TCP/IP as well as Named pipes seperately ?.
> Thanks
> Hari
> MCDBA
> "Brian" <bfordSPAMOFF@.markem.com> wrote in message
> news:#FFbR1l6DHA.2488@.TK2MSFTNGP09.phx.gbl...
> > Hari,
> >
> > Thanks for the response, unfortunately I know the network is not the
> > problem, and whilst this is not causing any issues on the SQL DB, it is
> > critical as far as the application is concerned as it doesn't work :(
> >
> > I have check MS KB and I have the latest SP installed, I have an
identical
> > setup on another box and everything is working fine.
> >
> > Any other clues?
> >
> > Thanks again for your input
> >
> > Brian
> >
> >
> > "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> > news:uFYF7ol6DHA.2404@.TK2MSFTNGP11.phx.gbl...
> > > Hi,
> > >
> > > Normally this error occurs due to Network problems and are not
critical
> > at
> > > all.
> > >
> > > Please look in to the below link for more details;
> > >
> > >
> >
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=0a0801c3
> > >
> >
>
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/groups%3Fq%3D17805%2Bin%2B
> > >
> >
>
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D0a0801c366
> > > fc%2524f930e9f0%2524a401280a%2540phx.gbl%26rnum%3D6
> > >
> > > Thanks
> > > Hari
> > > MCDBA
> > >
> > >
> > >
> > > "Brian" <bfordSPAMOFF@.markem.com> wrote in message
> > > news:#cUCzil6DHA.1852@.TK2MSFTNGP10.phx.gbl...
> > > > We have an application that is using our SQL Server 2000 as a
> > repository.
> > > > Occassionaly the application displays a "Severe Error Occured"
message
> > > when
> > > > trying to execute a command against the DB.
> > > >
> > > > The SQL Logs show "Error 17805 - Invalid buffer received from
client"
> > has
> > > > anyone any idea what this means?
> > > >
> > > > We did not write the application so we have no way of knowing what
> it's
> > > > trying to do other than insert data into the database.
> > > >
> > > > Thanks, for any help
> > > >
> > > > Brian
> > > >
> > > >
> > >
> > >
> >
> >
>
Error 17805
Occassionaly the application displays a "Severe Error Occured" message when
trying to execute a command against the DB.
The SQL Logs show "Error 17805 - Invalid buffer received from client" has
anyone any idea what this means?
We did not write the application so we have no way of knowing what it's
trying to do other than insert data into the database.
Thanks, for any help
BrianHi,
Normally this error occurs due to Network problems and are not critical at
all.
Please look in to the below link for more details;
http://groups.google.com/groups?hl=...hreadm=0a0801c3
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/groups%3Fq%3D17805%2Bin%2B
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUT
F-8%26oe%3DUTF-8%26selm%3D0a0801c366
fc%2524f930e9f0%2524a401280a%2540phx.gbl%26rnum%3D6
Thanks
Hari
MCDBA
"Brian" <bfordSPAMOFF@.markem.com> wrote in message
news:#cUCzil6DHA.1852@.TK2MSFTNGP10.phx.gbl...
quote:
> We have an application that is using our SQL Server 2000 as a repository.
> Occassionaly the application displays a "Severe Error Occured" message
when
quote:|||Hari,
> trying to execute a command against the DB.
> The SQL Logs show "Error 17805 - Invalid buffer received from client" has
> anyone any idea what this means?
> We did not write the application so we have no way of knowing what it's
> trying to do other than insert data into the database.
> Thanks, for any help
> Brian
>
Thanks for the response, unfortunately I know the network is not the
problem, and whilst this is not causing any issues on the SQL DB, it is
critical as far as the application is concerned as it doesn't work
I have check MS KB and I have the latest SP installed, I have an identical
setup on another box and everything is working fine.
Any other clues?
Thanks again for your input
Brian
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:uFYF7ol6DHA.2404@.TK2MSFTNGP11.phx.gbl...
quote:
> Hi,
> Normally this error occurs due to Network problems and are not critical
at
quote:
> all.
> Please look in to the below link for more details;
>
http://groups.google.com/groups?hl=...hreadm=0a0801c3
quote:
>
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/ groups%3Fq%3D17805%2Bin%2B
quote:
darkred">
>
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUT
F-8%26oe%3DUTF- 8%26selm%3D0a0801c366
quote:|||Hi,
ed">
> fc%2524f930e9f0%2524a401280a%2540phx.gbl%26rnum%3D6
> Thanks
> Hari
> MCDBA
>
> "Brian" <bfordSPAMOFF@.markem.com> wrote in message
> news:#cUCzil6DHA.1852@.TK2MSFTNGP10.phx.gbl...
repository.[QUOTE]
> when
has[QUOTE]
>
From the same machine, Did you tried connecting to SQL server using Query
Analyzer with TCP/IP as well as Named pipes seperately ?.
Thanks
Hari
MCDBA
"Brian" <bfordSPAMOFF@.markem.com> wrote in message
news:#FFbR1l6DHA.2488@.TK2MSFTNGP09.phx.gbl...
quote:
> Hari,
> Thanks for the response, unfortunately I know the network is not the
> problem, and whilst this is not causing any issues on the SQL DB, it is
> critical as far as the application is concerned as it doesn't work
> I have check MS KB and I have the latest SP installed, I have an identical
> setup on another box and everything is working fine.
> Any other clues?
> Thanks again for your input
> Brian
>
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:uFYF7ol6DHA.2404@.TK2MSFTNGP11.phx.gbl...
> at
>
http://groups.google.com/groups?hl=...hreadm=0a0801c3
quote:
>
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/ groups%3Fq%3D17805%2Bin%2B
quote:
darkred">
>
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUT
F-8%26oe%3DUTF- 8%26selm%3D0a0801c366
quote:|||I can connect to it just fine, the application that I am having trouble with
ed">
> repository.
> has
it's[QUOTE]
>
is located on a seperate server and, for the most part, has no trouble
connecting to the DB. It's just certain screens that fail with this error.
The SQL Server itself is serving many applications on our network connecting
via TCP and Named Pipes, it's just this one app that is giving us a problem.
I think it's time to get in touch with application vendor to find out what
sort of command it's trying to execute.
Thanks,
Brian
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:e2LqXLn6DHA.1752@.tk2msftngp13.phx.gbl...
quote:
> Hi,
> From the same machine, Did you tried connecting to SQL server using Query
> Analyzer with TCP/IP as well as Named pipes seperately ?.
> Thanks
> Hari
> MCDBA
> "Brian" <bfordSPAMOFF@.markem.com> wrote in message
> news:#FFbR1l6DHA.2488@.TK2MSFTNGP09.phx.gbl...
identical[QUOTE]
critical[QUOTE]
>
http://groups.google.com/groups?hl=...hreadm=0a0801c3
quote:
>
66fc%24f930e9f0%24a401280a%40phx.gbl&rnum=6&prev=/ groups%3Fq%3D17805%2Bin%2B
quote:
darkred">
>
sql%2Bserver%26hl%3Den%26lr%3D%26ie%3DUT
F-8%26oe%3DUTF- 8%26selm%3D0a0801c366
quote:
ed">
message[QUOTE]
client"[QUOTE]
> it's
>
Error 17803, Severity: 20, State: 12
I have 4 test boxes running our application. The application is a wervice
using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ CPU.
Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
running SQL Server 2000 Developer Edition. SP3a. The machines are also
runnign Share Point Services and BIz Talk 2004, although neither of those are
doing anything at this time. Two of the machines have 1GB physical memory, 2
have 2GB.
We have one test case where have to process a 50MB message (SOAP post with
50MB payload). The problem, interestingly enough occurs on both of the
machines with 2GB. With a default install of SQL Server, configured to
dynamically allocate memory, the insert saving the 50MB message fails. SQL
Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
available." Monitoring physical memory it doesn't appear that the box is
even close to out of memory. If I change the SQL server configuration to use
a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 times,
but it still occasionally fails logging the same error. It makes no sense,
especially where it works 100% of the time on the two boxes with less memory.
Any help here would be appreciated.
Hi GGould,
The answer to your question lies in the the way SQL allocates memory.
Every process (on a 32bits machine) gets and 4 GB Virtual address space in
this address space 2 GB is devote to user, 2 GB for kernel allocations.
SQL server, when it starts with the default memory configuration will map
his executable and dlls into this 2 GB virtual user address space and will
allocate all physical memory in the system to it's Bpool data "cache" of 8K
buffers, leaving 256 MB of his virtual address space for his so called mem to
leave which ican be used for all memory allocations > 8 KB.
On a system with 2 GB SQL will allocate ~1.7 GB physical memory for its
bpool and .exe/dlls. Mapping all this into the virtual address space exactlu
leaves ~256 mb for the mem to leave area
On a s system with 1 GB, SQL will allocate ~.7 GB physical mmeory for bpool
and .exe/dlls. Mapping this memory into the virtual address space leaves
~1.256 mb for allocations ending up in the mem to leave area.
As for your action it's required to allocate a >8kb block SQL will allocate
such block and map it in to the memto leave area.
If you need a memory block > can fit in mem to leave area you get the
insufficient memory error.
To workaround on the 2 GB system you can use the -gxxx startup parametera nd
specify > 256 for xxx . At startup SQL will leave more space for the mem to
leave area at the cost of Bpool
Ab othe options is if you have a enterprice edition of the OS to use the
/3GB. take care however wjen using terminal server and make sure the machine
is a dedicated SQL server else don't use /3gb in the boot.ini.
Regards,
Jago
> This is an annoying one.
> I have 4 test boxes running our application. The application is a wervice
> using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ CPU.
> Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
> running SQL Server 2000 Developer Edition. SP3a. The machines are also
> runnign Share Point Services and BIz Talk 2004, although neither of those are
> doing anything at this time. Two of the machines have 1GB physical memory, 2
> have 2GB.
> We have one test case where have to process a 50MB message (SOAP post with
> 50MB payload). The problem, interestingly enough occurs on both of the
> machines with 2GB. With a default install of SQL Server, configured to
> dynamically allocate memory, the insert saving the 50MB message fails. SQL
> Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
> available." Monitoring physical memory it doesn't appear that the box is
> even close to out of memory. If I change the SQL server configuration to use
> a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 times,
> but it still occasionally fails logging the same error. It makes no sense,
> especially where it works 100% of the time on the two boxes with less memory.
> Any help here would be appreciated.
|||Thanks,
That seems to have taken care of it.
"Jago" wrote:
[vbcol=seagreen]
> Hi GGould,
> The answer to your question lies in the the way SQL allocates memory.
> Every process (on a 32bits machine) gets and 4 GB Virtual address space in
> this address space 2 GB is devote to user, 2 GB for kernel allocations.
> SQL server, when it starts with the default memory configuration will map
> his executable and dlls into this 2 GB virtual user address space and will
> allocate all physical memory in the system to it's Bpool data "cache" of 8K
> buffers, leaving 256 MB of his virtual address space for his so called mem to
> leave which ican be used for all memory allocations > 8 KB.
> On a system with 2 GB SQL will allocate ~1.7 GB physical memory for its
> bpool and .exe/dlls. Mapping all this into the virtual address space exactlu
> leaves ~256 mb for the mem to leave area
> On a s system with 1 GB, SQL will allocate ~.7 GB physical mmeory for bpool
> and .exe/dlls. Mapping this memory into the virtual address space leaves
> ~1.256 mb for allocations ending up in the mem to leave area.
> As for your action it's required to allocate a >8kb block SQL will allocate
> such block and map it in to the memto leave area.
> If you need a memory block > can fit in mem to leave area you get the
> insufficient memory error.
> To workaround on the 2 GB system you can use the -gxxx startup parametera nd
> specify > 256 for xxx . At startup SQL will leave more space for the mem to
> leave area at the cost of Bpool
> Ab othe options is if you have a enterprice edition of the OS to use the
> /3GB. take care however wjen using terminal server and make sure the machine
> is a dedicated SQL server else don't use /3gb in the boot.ini.
>
> Regards,
>
> Jago
sql
Error 17803, Severity: 20, State: 12
I have 4 test boxes running our application. The application is a wervice
using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ CPU
.
Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
running SQL Server 2000 Developer Edition. SP3a. The machines are also
runnign Share Point Services and BIz Talk 2004, although neither of those ar
e
doing anything at this time. Two of the machines have 1GB physical memory,
2
have 2GB.
We have one test case where have to process a 50MB message (SOAP post with
50MB payload). The problem, interestingly enough occurs on both of the
machines with 2GB. With a default install of SQL Server, configured to
dynamically allocate memory, the insert saving the 50MB message fails. SQL
Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
available." Monitoring physical memory it doesn't appear that the box is
even close to out of memory. If I change the SQL server configuration to us
e
a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 times,
but it still occasionally fails logging the same error. It makes no sense,
especially where it works 100% of the time on the two boxes with less memory
.
Any help here would be appreciated.Hi GGould,
The answer to your question lies in the the way SQL allocates memory.
Every process (on a 32bits machine) gets and 4 GB Virtual address space in
this address space 2 GB is devote to user, 2 GB for kernel allocations.
SQL server, when it starts with the default memory configuration will map
his executable and dlls into this 2 GB virtual user address space and will
allocate all physical memory in the system to it's Bpool data "cache" of 8K
buffers, leaving 256 MB of his virtual address space for his so called mem t
o
leave which ican be used for all memory allocations > 8 KB.
On a system with 2 GB SQL will allocate ~1.7 GB physical memory for its
bpool and .exe/dlls. Mapping all this into the virtual address space exactlu
leaves ~256 mb for the mem to leave area
On a s system with 1 GB, SQL will allocate ~.7 GB physical mmeory for bpool
and .exe/dlls. Mapping this memory into the virtual address space leaves
~1.256 mb for allocations ending up in the mem to leave area.
As for your action it's required to allocate a >8kb block SQL will allocate
such block and map it in to the memto leave area.
If you need a memory block > can fit in mem to leave area you get the
insufficient memory error.
To workaround on the 2 GB system you can use the -gxxx startup parametera nd
specify > 256 for xxx . At startup SQL will leave more space for the mem to
leave area at the cost of Bpool
Ab othe options is if you have a enterprice edition of the OS to use the
/3GB. take care however wjen using terminal server and make sure the machine
is a dedicated SQL server else don't use /3gb in the boot.ini.
Regards,
Jago
> This is an annoying one.
> I have 4 test boxes running our application. The application is a wervice
> using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ C
PU.
> Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
> running SQL Server 2000 Developer Edition. SP3a. The machines are also
> runnign Share Point Services and BIz Talk 2004, although neither of those
are
> doing anything at this time. Two of the machines have 1GB physical memory
, 2
> have 2GB.
> We have one test case where have to process a 50MB message (SOAP post with
> 50MB payload). The problem, interestingly enough occurs on both of the
> machines with 2GB. With a default install of SQL Server, configured to
> dynamically allocate memory, the insert saving the 50MB message fails. SQ
L
> Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
> available." Monitoring physical memory it doesn't appear that the box is
> even close to out of memory. If I change the SQL server configuration to
use
> a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 time
s,
> but it still occasionally fails logging the same error. It makes no sense
,
> especially where it works 100% of the time on the two boxes with less memo
ry.
> Any help here would be appreciated.|||Thanks,
That seems to have taken care of it.
"Jago" wrote:
[vbcol=seagreen]
> Hi GGould,
> The answer to your question lies in the the way SQL allocates memory.
> Every process (on a 32bits machine) gets and 4 GB Virtual address space in
> this address space 2 GB is devote to user, 2 GB for kernel allocations.
> SQL server, when it starts with the default memory configuration will map
> his executable and dlls into this 2 GB virtual user address space and will
> allocate all physical memory in the system to it's Bpool data "cache" of 8
K
> buffers, leaving 256 MB of his virtual address space for his so called mem
to
> leave which ican be used for all memory allocations > 8 KB.
> On a system with 2 GB SQL will allocate ~1.7 GB physical memory for its
> bpool and .exe/dlls. Mapping all this into the virtual address space exact
lu
> leaves ~256 mb for the mem to leave area
> On a s system with 1 GB, SQL will allocate ~.7 GB physical mmeory for bpoo
l
> and .exe/dlls. Mapping this memory into the virtual address space leaves
> ~1.256 mb for allocations ending up in the mem to leave area.
> As for your action it's required to allocate a >8kb block SQL will allocat
e
> such block and map it in to the memto leave area.
> If you need a memory block > can fit in mem to leave area you get the
> insufficient memory error.
> To workaround on the 2 GB system you can use the -gxxx startup parametera
nd
> specify > 256 for xxx . At startup SQL will leave more space for the mem t
o
> leave area at the cost of Bpool
> Ab othe options is if you have a enterprice edition of the OS to use the
> /3GB. take care however wjen using terminal server and make sure the machi
ne
> is a dedicated SQL server else don't use /3gb in the boot.ini.
>
> Regards,
>
> Jago
Error 17803, Severity: 20, State: 12
I have 4 test boxes running our application. The application is a wervice
using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ CPU.
Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
running SQL Server 2000 Developer Edition. SP3a. The machines are also
runnign Share Point Services and BIz Talk 2004, although neither of those are
doing anything at this time. Two of the machines have 1GB physical memory, 2
have 2GB.
We have one test case where have to process a 50MB message (SOAP post with
50MB payload). The problem, interestingly enough occurs on both of the
machines with 2GB. With a default install of SQL Server, configured to
dynamically allocate memory, the insert saving the 50MB message fails. SQL
Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
available." Monitoring physical memory it doesn't appear that the box is
even close to out of memory. If I change the SQL server configuration to use
a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 times,
but it still occasionally fails logging the same error. It makes no sense,
especially where it works 100% of the time on the two boxes with less memory.
Any help here would be appreciated.Hi GGould,
The answer to your question lies in the the way SQL allocates memory.
Every process (on a 32bits machine) gets and 4 GB Virtual address space in
this address space 2 GB is devote to user, 2 GB for kernel allocations.
SQL server, when it starts with the default memory configuration will map
his executable and dlls into this 2 GB virtual user address space and will
allocate all physical memory in the system to it's Bpool data "cache" of 8K
buffers, leaving 256 MB of his virtual address space for his so called mem to
leave which ican be used for all memory allocations > 8 KB.
On a system with 2 GB SQL will allocate ~1.7 GB physical memory for its
bpool and .exe/dlls. Mapping all this into the virtual address space exactlu
leaves ~256 mb for the mem to leave area
On a s system with 1 GB, SQL will allocate ~.7 GB physical mmeory for bpool
and .exe/dlls. Mapping this memory into the virtual address space leaves
~1.256 mb for allocations ending up in the mem to leave area.
As for your action it's required to allocate a >8kb block SQL will allocate
such block and map it in to the memto leave area.
If you need a memory block > can fit in mem to leave area you get the
insufficient memory error.
To workaround on the 2 GB system you can use the -gxxx startup parametera nd
specify > 256 for xxx . At startup SQL will leave more space for the mem to
leave area at the cost of Bpool
Ab othe options is if you have a enterprice edition of the OS to use the
/3GB. take care however wjen using terminal server and make sure the machine
is a dedicated SQL server else don't use /3gb in the boot.ini.
Regards,
Jago
> This is an annoying one.
> I have 4 test boxes running our application. The application is a wervice
> using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ CPU.
> Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
> running SQL Server 2000 Developer Edition. SP3a. The machines are also
> runnign Share Point Services and BIz Talk 2004, although neither of those are
> doing anything at this time. Two of the machines have 1GB physical memory, 2
> have 2GB.
> We have one test case where have to process a 50MB message (SOAP post with
> 50MB payload). The problem, interestingly enough occurs on both of the
> machines with 2GB. With a default install of SQL Server, configured to
> dynamically allocate memory, the insert saving the 50MB message fails. SQL
> Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
> available." Monitoring physical memory it doesn't appear that the box is
> even close to out of memory. If I change the SQL server configuration to use
> a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 times,
> but it still occasionally fails logging the same error. It makes no sense,
> especially where it works 100% of the time on the two boxes with less memory.
> Any help here would be appreciated.|||Thanks,
That seems to have taken care of it.
"Jago" wrote:
> Hi GGould,
> The answer to your question lies in the the way SQL allocates memory.
> Every process (on a 32bits machine) gets and 4 GB Virtual address space in
> this address space 2 GB is devote to user, 2 GB for kernel allocations.
> SQL server, when it starts with the default memory configuration will map
> his executable and dlls into this 2 GB virtual user address space and will
> allocate all physical memory in the system to it's Bpool data "cache" of 8K
> buffers, leaving 256 MB of his virtual address space for his so called mem to
> leave which ican be used for all memory allocations > 8 KB.
> On a system with 2 GB SQL will allocate ~1.7 GB physical memory for its
> bpool and .exe/dlls. Mapping all this into the virtual address space exactlu
> leaves ~256 mb for the mem to leave area
> On a s system with 1 GB, SQL will allocate ~.7 GB physical mmeory for bpool
> and .exe/dlls. Mapping this memory into the virtual address space leaves
> ~1.256 mb for allocations ending up in the mem to leave area.
> As for your action it's required to allocate a >8kb block SQL will allocate
> such block and map it in to the memto leave area.
> If you need a memory block > can fit in mem to leave area you get the
> insufficient memory error.
> To workaround on the 2 GB system you can use the -gxxx startup parametera nd
> specify > 256 for xxx . At startup SQL will leave more space for the mem to
> leave area at the cost of Bpool
> Ab othe options is if you have a enterprice edition of the OS to use the
> /3GB. take care however wjen using terminal server and make sure the machine
> is a dedicated SQL server else don't use /3gb in the boot.ini.
>
> Regards,
>
> Jago
> > This is an annoying one.
> > I have 4 test boxes running our application. The application is a wervice
> > using ADO.Net to connect to SQL Server. The machines are all P4, 2.8GHZ CPU.
> > Windows Server 2003 Std. Edition, w/ all current patches (as of 10/13/04)
> > running SQL Server 2000 Developer Edition. SP3a. The machines are also
> > runnign Share Point Services and BIz Talk 2004, although neither of those are
> > doing anything at this time. Two of the machines have 1GB physical memory, 2
> > have 2GB.
> > We have one test case where have to process a 50MB message (SOAP post with
> > 50MB payload). The problem, interestingly enough occurs on both of the
> > machines with 2GB. With a default install of SQL Server, configured to
> > dynamically allocate memory, the insert saving the 50MB message fails. SQL
> > Server logs "Error: 17803, Severity 20, State:12 Insufficient memory
> > available." Monitoring physical memory it doesn't appear that the box is
> > even close to out of memory. If I change the SQL server configuration to use
> > a fixed or minimum amount of memory (1GB) the insert works 8 out of 9 times,
> > but it still occasionally fails logging the same error. It makes no sense,
> > especially where it works 100% of the time on the two boxes with less memory.
> > Any help here would be appreciated.
Error 16954
What maybe the reason of error 16954: "Executing SQL Directly; no
cursor". I have SQL 2000 SP3, application runs from client machine. What
elements can affect this error?
bye...
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +--+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+Hi
Does this werror occur every time, or only now and then?
What code is being executed?
Regards
Mike
"[BuKoX]" wrote:
> Hello.
> What maybe the reason of error 16954: "Executing SQL Directly; no
> cursor". I have SQL 2000 SP3, application runs from client machine. What
> elements can affect this error?
> bye...
> --
> __ __
> |__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
> |__// |__|| | \\ \__// / \\ +--+
> +[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+
>|||Mike Epprecht (SQL MVP) wrote:
> Does this werror occur every time, or only now and then?
> What code is being executed?
This error occured as long as application is running and queries are
executed (every queries). Application connect db through MDAC.
bye...
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +--+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+|||does your SQLServer crash (or very slow) after this?
any other application(s) able to connect and run a query on this server
after that?
Error 16954
What maybe the reason of error 16954: "Executing SQL Directly; no
cursor". I have SQL 2000 SP3, application runs from client machine. What
elements can affect this error?
bye...
--
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +--+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+Hi
Does this werror occur every time, or only now and then?
What code is being executed?
Regards
Mike
"[BuKoX]" wrote:
> Hello.
> What maybe the reason of error 16954: "Executing SQL Directly; no
> cursor". I have SQL 2000 SP3, application runs from client machine. What
> elements can affect this error?
> bye...
> --
> __ __
> |__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
> |__// |__|| | \\ \__// / \\ +--+
> +[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+
>|||Mike Epprecht (SQL MVP) wrote:
> Does this werror occur every time, or only now and then?
> What code is being executed?
This error occured as long as application is running and queries are
executed (every queries). Application connect db through MDAC.
bye...
--
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +--+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+|||does your SQLServer crash (or very slow) after this?
any other application(s) able to connect and run a query on this server
after that?
Error 16954
What maybe the reason of error 16954: "Executing SQL Directly; no
cursor". I have SQL 2000 SP3, application runs from client machine. What
elements can affect this error?
bye...
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +--+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+
Hi
Does this werror occur every time, or only now and then?
What code is being executed?
Regards
Mike
"[BuKoX]" wrote:
> Hello.
> What maybe the reason of error 16954: "Executing SQL Directly; no
> cursor". I have SQL 2000 SP3, application runs from client machine. What
> elements can affect this error?
> bye...
> --
> __ __
> |__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
> |__// |__|| | \\ \__// / \\ +--+
> +[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+
>
|||Mike Epprecht (SQL MVP) wrote:
> Does this werror occur every time, or only now and then?
> What code is being executed?
This error occured as long as application is running and queries are
executed (every queries). Application connect db through MDAC.
bye...
__ __
|__\\ | || |_// / \\ \_// FreeBSD: The Power To Serve
|__// |__|| | \\ \__// / \\ +--+
+[ http://bukox.prv.pl ][ http://total.bukox.dmkproject.pl ]+
|||does your SQLServer crash (or very slow) after this?
any other application(s) able to connect and run a query on this server
after that?
Monday, March 19, 2012
Error 1355 from SQL Server 2000
is from SQL Server 2000,
Category: (B),
Event ID: 19011,
Description:
SuperSocket Info: (SpnRegister): Error 1355
What is about? Where should I look into?
Thanks,
TianwenHave you seen this: http://support.microsoft.com/?kbid=303411
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"tianwen" <anonymous@.discussions.microsoft.com> wrote in message
news:0d3801c3d934$40dd2f30$a601280a@.phx.gbl...
I found a warning from Event Viewer application log. It
is from SQL Server 2000,
Category: (B),
Event ID: 19011,
Description:
SuperSocket Info: (SpnRegister): Error 1355
What is about? Where should I look into?
Thanks,
Tianwen
Error 1355 from SQL Server 2000
is from SQL Server 2000,
Category: (B),
Event ID: 19011,
Description:
SuperSocket Info: (SpnRegister): Error 1355
What is about? Where should I look into?
Thanks,
TianwenHave you seen this: http://support.microsoft.com/?kbid=303411
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"tianwen" <anonymous@.discussions.microsoft.com> wrote in message
news:0d3801c3d934$40dd2f30$a601280a@.phx.gbl...
I found a warning from Event Viewer application log. It
is from SQL Server 2000,
Category: (B),
Event ID: 19011,
Description:
SuperSocket Info: (SpnRegister): Error 1355
What is about? Where should I look into?
Thanks,
Tianwen
Sunday, March 11, 2012
Error 1105
I have a production database for financial services. The front-end
application is from CODA. Financial. This is the only app that access this
database. Every now and again, some process(es) will need more tempdb space
then the current size. So SQL will auto grow that database. Our problem is
that the drive will eventfully be consumed, and then ... well you can guess.
So, we have done 3 things.
1: create a job that will, weekly, shrink the tempdb logfile during off
hours on the weekend.
2: We set a max size for the tempdb. This was done in an attempt to isolate
the process(es) that where eating up tempdb. However, this seems to be no
big deal for the user(s) when they get the 1105 error. No user has
complained and no process, or job, has crash because of it.
3: I create an alert and job to be run when an Error 1105 is recorded. The
job will exec SP_WHO2.
Now one of 2 things will happen when an Error 1105 is triggered.
1: The sp_who2 will, sometimes, capture the user.(almost always the
application login). However, what I don't get is anything that will lead me
to the actual user: such as - network address, host name of user, etc.. So,
no way to back track to the user/process and what they are doing.
2: By the time the alter triggers the job, the offending user is
disconnected from the SQL Server and all I'm left with is the spid in the
sql error log.
I'm open to any advise, suggestions or thoughts on a better way to track
down the process(es) that keep consuming tempdb.
TIA
JoeAudit Logging. You could use a profiler as well but be careful on the no.
of events you use as it could eat up disk space.
Thanks,
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Friday, March 9, 2012
Error 0x800C0008 with multiple subreports
Hi,
strange behaviour in our production environment, while in the test servers all goes ok:
web application with web report viewer, the report is fine but clicking on "preview" or "print" an error 0x800C008 occurs.
The report include 3 subreports, and here's the problem: after some attempts i realized that each subreport (alone in the master report) works fine, but more than 1 in the same master report produces the error!
Here is the log:
w3wp!library!7!04/17/2007-11:23:55:: i INFO: Call to RenderNext( '/WRReports/Orders' )
w3wp!processing!7!04/17/2007-11:23:55:: a ASSERT: Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Assert(Boolean condition)
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.RegisterDefinitionObject(IDOwner idOwner)
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.ReadReportItemBase(ReportItem reportItem)
...
Microsoft.ReportingServices.Library.AsyncExecution.AsyncStartMain(Object state)
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
Microsoft.ReportingServices.Diagnostics.ThreadWorkItem.SafeThreadPoolCallback(Object ctx)
System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
System.Threading.ExecutionContext.runTryCode(Object userData)
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)w3wp!library!7!04/17/2007-11:23:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: Errore interno nel server di report. Per ulteriori informazioni, vedere il log degli errori., un-named assertion fired for component processing;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: Errore interno nel server di report. Per ulteriori informazioni, vedere il log degli errori.
Any ideas?
Thanks in advance to anyone
Hi all,
we found the solution and so we can post it for public utility.
The problem were related to the size of reports.
When reports exceed a few bytes, reporting services uses a "transfer-enconding: chunked" header in the http message from the rssclientreport object in the html page.
So, a proxy in the middle of our architecture were unable to do its job because it didn't understand that header; an installation of the last version of that proxy solved the problem.
We didn't found any way to change that behavior of ssrs2005 and forcing it to use standard transfer encoding.
bye.
Error 0x800C0008 with multiple subreports
Hi,
strange behaviour in our production environment, while in the test servers all goes ok:
web application with web report viewer, the report is fine but clicking on "preview" or "print" an error 0x800C008 occurs.
The report include 3 subreports, and here's the problem: after some attempts i realized that each subreport (alone in the master report) works fine, but more than 1 in the same master report produces the error!
Here is the log:
w3wp!library!7!04/17/2007-11:23:55:: i INFO: Call to RenderNext( '/WRReports/Orders' )
w3wp!processing!7!04/17/2007-11:23:55:: a ASSERT: Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.Assert(Boolean condition)
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.RegisterDefinitionObject(IDOwner idOwner)
Microsoft.ReportingServices.ReportProcessing.Persistence.IntermediateFormatReader.ReadReportItemBase(ReportItem reportItem)
...
Microsoft.ReportingServices.Library.AsyncExecution.AsyncStartMain(Object state)
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
Microsoft.ReportingServices.Diagnostics.ThreadWorkItem.SafeThreadPoolCallback(Object ctx)
System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
System.Threading.ExecutionContext.runTryCode(Object userData)
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)w3wp!library!7!04/17/2007-11:23:55:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: Errore interno nel server di report. Per ulteriori informazioni, vedere il log degli errori., un-named assertion fired for component processing;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: Errore interno nel server di report. Per ulteriori informazioni, vedere il log degli errori.
Any ideas?
Thanks in advance to anyone
Hi all,
we found the solution and so we can post it for public utility.
The problem were related to the size of reports.
When reports exceed a few bytes, reporting services uses a "transfer-enconding: chunked" header in the http message from the rssclientreport object in the html page.
So, a proxy in the middle of our architecture were unable to do its job because it didn't understand that header; an installation of the last version of that proxy solved the problem.
We didn't found any way to change that behavior of ssrs2005 and forcing it to use standard transfer encoding.
bye.
Wednesday, March 7, 2012
Error 07002 - SQLBindParameter not used for all parameters
that connects to a MySQL database and loads a table into a Dataset, and
then displays that table information in a DataGrid on a form for
editing. The table fill works fine, the delete function works fine, but
when I try to update a row, the application fails with the following
error message:
An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred
in system.data.dll
Additional information: System error.
'Data Access VB App.exe': Loaded
'c:\windows\assembly\gac\microsoft.visualbasic\7.0 .5000.0__b03f5f7f11d50
a3a\microsoft.visualbasic.dll', No symbols loaded.
Unhandled Exception: System.Data.Odbc.OdbcException: ERROR [07002]
[MySQL][ODBC 3.51 Driver][mysqld-4.0.21-debug]SQLBindParameter not used
for all parameters
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
srcTable)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Data_Access_VB_App.Form1.btnUpdate_Click(Object sender, EventArgs
e) in C:\Documents and Settings\System Admin\My Documents\Visual Studio
Projects\Data Access VB App\Form1.vb:line 225
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProThe program '[2608] Data Access
VB App.exe' has exited with code 0 (0x0).
c(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeM
ethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Data_Access_VB_App.Form1.Main() in C:\Documents and
Settings\System Admin\My Documents\Visual Studio Projects\Data Access VB
App\Form1.vb:line 1
The majority of the code was generated by Visual Studio and based on the
error message it would seem that I have to add SQLBindParameter
statements, but I am not sure the syntax that I should be using. I am
new to VB.NET (coming from Java/J2EE) and haven't been able to come up
with a workable solution after pouring over the MSDN manuals. Here is
the generated code:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Friend WithEvents OdbcConnection1 As System.Data.Odbc.OdbcConnection
Friend WithEvents DsTags1 As Data_Access_VB_App.dsTags
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents btnUpdate As System.Windows.Forms.Button
Friend WithEvents btnLoad As System.Windows.Forms.Button
Friend WithEvents OdbcDataAdapter2 As
System.Data.Odbc.OdbcDataAdapter
Friend WithEvents OdbcSelectCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcInsertCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcConnection2 As System.Data.Odbc.OdbcConnection
Friend WithEvents OdbcDeleteCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcUpdateCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcSelectCommand1 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcInsertCommand1 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcDeleteCommand1 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcUpdateCommand1 As System.Data.Odbc.OdbcCommand
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.DsTags1 = New Data_Access_VB_App.dsTags
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.btnUpdate = New System.Windows.Forms.Button
Me.btnLoad = New System.Windows.Forms.Button
Me.OdbcDataAdapter2 = New System.Data.Odbc.OdbcDataAdapter
Me.OdbcDeleteCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection2 = New System.Data.Odbc.OdbcConnection
Me.OdbcInsertCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcSelectCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcUpdateCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcDeleteCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcUpdateCommand1 = New System.Data.Odbc.OdbcCommand
CType(Me.DsTags1,
System.ComponentModel.ISupportInitialize).BeginIni t()
CType(Me.DataGrid1,
System.ComponentModel.ISupportInitialize).BeginIni t()
Me.SuspendLayout()
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.DeleteCommand = Me.OdbcDeleteCommand1
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "epctag", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ID", "ID"), New
System.Data.Common.DataColumnMapping("OBJECT_EPC", "OBJECT_EPC"), New
System.Data.Common.DataColumnMapping("READER_EPC", "READER_EPC"), New
System.Data.Common.DataColumnMapping("DATE_TIME", "DATE_TIME"), New
System.Data.Common.DataColumnMapping("PAYLOAD", "PAYLOAD"), New
System.Data.Common.DataColumnMapping("GTIN_DOMAIN" , "GTIN_DOMAIN"), New
System.Data.Common.DataColumnMapping("GTIN_CLASS", "GTIN_CLASS")})})
Me.OdbcDataAdapter1.UpdateCommand = Me.OdbcUpdateCommand1
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
"STMT=;OPTION=3;DSN=EPCThingsNET;UID=root;SOCKET=; DESC=MySQL ODBC 3.51
Driver DSN;" & _
"DATABASE=thingsnet;SERVER=localhost;PORT=3306 "
'
'DsTags1
'
Me.DsTags1.DataSetName = "dsTags"
Me.DsTags1.Locale = New
System.Globalization.CultureInfo("en-US")
'
'DataGrid1
'
Me.DataGrid1.DataMember = "epctag"
Me.DataGrid1.DataSource = Me.DsTags1
Me.DataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(8, 128)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.Size = New System.Drawing.Size(584, 264)
Me.DataGrid1.TabIndex = 0
'
'btnUpdate
'
Me.btnUpdate.Location = New System.Drawing.Point(224, 48)
Me.btnUpdate.Name = "btnUpdate"
Me.btnUpdate.Size = New System.Drawing.Size(152, 23)
Me.btnUpdate.TabIndex = 1
Me.btnUpdate.Text = "Save Changes in Database"
'
'btnLoad
'
Me.btnLoad.Location = New System.Drawing.Point(56, 40)
Me.btnLoad.Name = "btnLoad"
Me.btnLoad.TabIndex = 2
Me.btnLoad.Text = "Load Data"
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ID, OBJECT_EPC,
READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, GTIN_CLASS FR" & _
"OM epctag"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO epctag(ID,
OBJECT_EPC, READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, G" & _
"TIN_CLASS) VALUES (?, ?, ?, ?, ?, ?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
0, "ID"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("OBJECT_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("READER_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("DATE_TIME",
System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("PAYLOAD",
System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_CLASS",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
'
'OdbcDeleteCommand1
'
Me.OdbcDeleteCommand1.CommandText = "DELETE FROM epctag WHERE
(ID = ?)"
Me.OdbcDeleteCommand1.Connection = Me.OdbcConnection1
Me.OdbcDeleteCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "ID", System.Data.DataRowVersion.Original, Nothing))
'
'OdbcUpdateCommand1
'
Me.OdbcUpdateCommand1.CommandText = "UPDATE ecptag SET ID = ?,
OBJECT_EPC = ?, READER_EPC = ?, DATE_TIME = ?, PAYLOAD " & _
"= ?, GTIN_DOMAIN = ?, GTIN_CLASS = ? WHERE (ID = ?)"
Me.OdbcUpdateCommand1.Connection = Me.OdbcConnection1
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
0, "ID"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("OBJECT_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("READER_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("DATE_TIME",
System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("PAYLOAD",
System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_CLASS",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(608, 398)
Me.Controls.Add(Me.btnLoad)
Me.Controls.Add(Me.btnUpdate)
Me.Controls.Add(Me.DataGrid1)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.DsTags1,
System.ComponentModel.ISupportInitialize).EndInit( )
CType(Me.DataGrid1,
System.ComponentModel.ISupportInitialize).EndInit( )
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnUpdate.Click
OdbcDataAdapter1.Update(DsTags1)
MessageBox.Show("Database Updated!")
End Sub
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLoad.Click
OdbcDataAdapter1.Fill(DsTags1)
MessageBox.Show("Data Table Loaded Successfully!")
End Sub
End Class
That's the long and short of it! Appreciate any help.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
You aren't binding the correct number of parameters for the update command.
You are expecting ODBC to use the "ID" parameter twice, but that wont
happen. You have to bind an OdbcParameter object for each '?'. If you have
8 parameter markers, you must bind 8 parameters. You are only binding 7
parameters.
Brannon
"Mikey G" <nospam@.devdex.com> wrote in message
news:#M02y8hsEHA.2808@.TK2MSFTNGP14.phx.gbl...
> Hi, I created a simple VB.NET 2003 application through Visual Studio
> that connects to a MySQL database and loads a table into a Dataset, and
> then displays that table information in a DataGrid on a form for
> editing. The table fill works fine, the delete function works fine, but
> when I try to update a row, the application fails with the following
> error message:
> An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred
> in system.data.dll
> Additional information: System error.
> 'Data Access VB App.exe': Loaded
> 'c:\windows\assembly\gac\microsoft.visualbasic\7.0 .5000.0__b03f5f7f11d50
> a3a\microsoft.visualbasic.dll', No symbols loaded.
> Unhandled Exception: System.Data.Odbc.OdbcException: ERROR [07002]
> [MySQL][ODBC 3.51 Driver][mysqld-4.0.21-debug]SQLBindParameter not used
> for all parameters
> at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
> DataTableMapping tableMapping)
> at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
> srcTable)
> at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
> at Data_Access_VB_App.Form1.btnUpdate_Click(Object sender, EventArgs
> e) in C:\Documents and Settings\System Admin\My Documents\Visual Studio
> Projects\Data Access VB App\Form1.vb:line 225
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProThe program '[2608] Data Access
> VB App.exe' has exited with code 0 (0x0).
> c(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
> at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd,
> Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG&
> msg)
> at
> System.Windows.Forms.ComponentManager.System.Windo ws.Forms.UnsafeNativeM
> ethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
> reason, Int32 pvLoopData)
> at System.Windows.Forms.ThreadContext.RunMessageLoopI nner(Int32
> reason, ApplicationContext context)
> at System.Windows.Forms.ThreadContext.RunMessageLoop( Int32 reason,
> ApplicationContext context)
> at System.Windows.Forms.Application.Run(Form mainForm)
> at Data_Access_VB_App.Form1.Main() in C:\Documents and
> Settings\System Admin\My Documents\Visual Studio Projects\Data Access VB
> App\Form1.vb:line 1
>
> The majority of the code was generated by Visual Studio and based on the
> error message it would seem that I have to add SQLBindParameter
> statements, but I am not sure the syntax that I should be using. I am
> new to VB.NET (coming from Java/J2EE) and haven't been able to come up
> with a workable solution after pouring over the MSDN manuals. Here is
> the generated code:
>
> Public Class Form1
> Inherits System.Windows.Forms.Form
> #Region " Windows Form Designer generated code "
> Public Sub New()
> MyBase.New()
> 'This call is required by the Windows Form Designer.
> InitializeComponent()
> 'Add any initialization after the InitializeComponent() call
> End Sub
> 'Form overrides dispose to clean up the component list.
> Protected Overloads Overrides Sub Dispose(ByVal disposing As
> Boolean)
> If disposing Then
> If Not (components Is Nothing) Then
> components.Dispose()
> End If
> End If
> MyBase.Dispose(disposing)
> End Sub
> 'NOTE: The following procedure is required by the Windows Form Designer
> 'It can be modified using the Windows Form Designer.
> 'Do not modify it using the code editor.
> Friend WithEvents OdbcDataAdapter1 As
> System.Data.Odbc.OdbcDataAdapter
> Friend WithEvents OdbcConnection1 As System.Data.Odbc.OdbcConnection
> Friend WithEvents DsTags1 As Data_Access_VB_App.dsTags
> Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
> Friend WithEvents btnUpdate As System.Windows.Forms.Button
> Friend WithEvents btnLoad As System.Windows.Forms.Button
> Friend WithEvents OdbcDataAdapter2 As
> System.Data.Odbc.OdbcDataAdapter
> Friend WithEvents OdbcSelectCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcInsertCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcConnection2 As System.Data.Odbc.OdbcConnection
> Friend WithEvents OdbcDeleteCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcUpdateCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcSelectCommand1 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcInsertCommand1 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcDeleteCommand1 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcUpdateCommand1 As System.Data.Odbc.OdbcCommand
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
> Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
> Me.DsTags1 = New Data_Access_VB_App.dsTags
> Me.DataGrid1 = New System.Windows.Forms.DataGrid
> Me.btnUpdate = New System.Windows.Forms.Button
> Me.btnLoad = New System.Windows.Forms.Button
> Me.OdbcDataAdapter2 = New System.Data.Odbc.OdbcDataAdapter
> Me.OdbcDeleteCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcConnection2 = New System.Data.Odbc.OdbcConnection
> Me.OdbcInsertCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcSelectCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcUpdateCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcDeleteCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcUpdateCommand1 = New System.Data.Odbc.OdbcCommand
> CType(Me.DsTags1,
> System.ComponentModel.ISupportInitialize).BeginIni t()
> CType(Me.DataGrid1,
> System.ComponentModel.ISupportInitialize).BeginIni t()
> Me.SuspendLayout()
> '
> 'OdbcDataAdapter1
> '
> Me.OdbcDataAdapter1.DeleteCommand = Me.OdbcDeleteCommand1
> Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
> Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
> Me.OdbcDataAdapter1.TableMappings.AddRange(New
> System.Data.Common.DataTableMapping() {New
> System.Data.Common.DataTableMapping("Table", "epctag", New
> System.Data.Common.DataColumnMapping() {New
> System.Data.Common.DataColumnMapping("ID", "ID"), New
> System.Data.Common.DataColumnMapping("OBJECT_EPC", "OBJECT_EPC"), New
> System.Data.Common.DataColumnMapping("READER_EPC", "READER_EPC"), New
> System.Data.Common.DataColumnMapping("DATE_TIME", "DATE_TIME"), New
> System.Data.Common.DataColumnMapping("PAYLOAD", "PAYLOAD"), New
> System.Data.Common.DataColumnMapping("GTIN_DOMAIN" , "GTIN_DOMAIN"), New
> System.Data.Common.DataColumnMapping("GTIN_CLASS", "GTIN_CLASS")})})
> Me.OdbcDataAdapter1.UpdateCommand = Me.OdbcUpdateCommand1
> '
> 'OdbcConnection1
> '
> Me.OdbcConnection1.ConnectionString =
> "STMT=;OPTION=3;DSN=EPCThingsNET;UID=root;SOCKET=; DESC=MySQL ODBC 3.51
> Driver DSN;" & _
> "DATABASE=thingsnet;SERVER=localhost;PORT=3306 "
> '
> 'DsTags1
> '
> Me.DsTags1.DataSetName = "dsTags"
> Me.DsTags1.Locale = New
> System.Globalization.CultureInfo("en-US")
> '
> 'DataGrid1
> '
> Me.DataGrid1.DataMember = "epctag"
> Me.DataGrid1.DataSource = Me.DsTags1
> Me.DataGrid1.HeaderForeColor =
> System.Drawing.SystemColors.ControlText
> Me.DataGrid1.Location = New System.Drawing.Point(8, 128)
> Me.DataGrid1.Name = "DataGrid1"
> Me.DataGrid1.Size = New System.Drawing.Size(584, 264)
> Me.DataGrid1.TabIndex = 0
> '
> 'btnUpdate
> '
> Me.btnUpdate.Location = New System.Drawing.Point(224, 48)
> Me.btnUpdate.Name = "btnUpdate"
> Me.btnUpdate.Size = New System.Drawing.Size(152, 23)
> Me.btnUpdate.TabIndex = 1
> Me.btnUpdate.Text = "Save Changes in Database"
> '
> 'btnLoad
> '
> Me.btnLoad.Location = New System.Drawing.Point(56, 40)
> Me.btnLoad.Name = "btnLoad"
> Me.btnLoad.TabIndex = 2
> Me.btnLoad.Text = "Load Data"
> '
> 'OdbcSelectCommand1
> '
> Me.OdbcSelectCommand1.CommandText = "SELECT ID, OBJECT_EPC,
> READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, GTIN_CLASS FR" & _
> "OM epctag"
> Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
> '
> 'OdbcInsertCommand1
> '
> Me.OdbcInsertCommand1.CommandText = "INSERT INTO epctag(ID,
> OBJECT_EPC, READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, G" & _
> "TIN_CLASS) VALUES (?, ?, ?, ?, ?, ?, ?)"
> Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
> 0, "ID"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("OBJECT_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("READER_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("DATE_TIME",
> System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("PAYLOAD",
> System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_CLASS",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
> '
> 'OdbcDeleteCommand1
> '
> Me.OdbcDeleteCommand1.CommandText = "DELETE FROM epctag WHERE
> (ID = ?)"
> Me.OdbcDeleteCommand1.Connection = Me.OdbcConnection1
> Me.OdbcDeleteCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
> 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
> Byte), "ID", System.Data.DataRowVersion.Original, Nothing))
> '
> 'OdbcUpdateCommand1
> '
> Me.OdbcUpdateCommand1.CommandText = "UPDATE ecptag SET ID = ?,
> OBJECT_EPC = ?, READER_EPC = ?, DATE_TIME = ?, PAYLOAD " & _
> "= ?, GTIN_DOMAIN = ?, GTIN_CLASS = ? WHERE (ID = ?)"
> Me.OdbcUpdateCommand1.Connection = Me.OdbcConnection1
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
> 0, "ID"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("OBJECT_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("READER_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("DATE_TIME",
> System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("PAYLOAD",
> System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_CLASS",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
> '
> 'Form1
> '
> Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
> Me.ClientSize = New System.Drawing.Size(608, 398)
> Me.Controls.Add(Me.btnLoad)
> Me.Controls.Add(Me.btnUpdate)
> Me.Controls.Add(Me.DataGrid1)
> Me.Name = "Form1"
> Me.Text = "Form1"
> CType(Me.DsTags1,
> System.ComponentModel.ISupportInitialize).EndInit( )
> CType(Me.DataGrid1,
> System.ComponentModel.ISupportInitialize).EndInit( )
> Me.ResumeLayout(False)
> End Sub
> #End Region
> Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e
> As System.EventArgs) Handles btnUpdate.Click
> OdbcDataAdapter1.Update(DsTags1)
> MessageBox.Show("Database Updated!")
> End Sub
> Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btnLoad.Click
> OdbcDataAdapter1.Fill(DsTags1)
> MessageBox.Show("Data Table Loaded Successfully!")
> End Sub
> End Class
>
> That's the long and short of it! Appreciate any help.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
Error 07002 - SQLBindParameter not used for all parameters
that connects to a mysql database and loads a table into a Dataset, and
then displays that table information in a DataGrid on a form for
editing. The table fill works fine, the delete function works fine, but
when I try to update a row, the application fails with the following
error message:
An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred
in system.data.dll
Additional information: System error.
'Data Access VB App.exe': Loaded
'c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50
a3a\microsoft.visualbasic.dll', No symbols loaded.
Unhandled Exception: System.Data.Odbc.OdbcException: ERROR [07002]
[MySQL][ODBC 3.51 Driver][mysqld-4.0.21-debug]SQLBindParameter n
ot used
for all parameters
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
srcTable)
at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
at Data_Access_VB_App.Form1.btnUpdate_Click(Object sender, EventArgs
e) in C:\Documents and Settings\System Admin\My Documents\Visual Studio
Projects\Data Access VB App\Form1.vb:line 225
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProThe program '[2608] Data Access
VB App.exe' has exited with code 0 (0x0).
c(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
at
System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeM
ethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Data_Access_VB_App.Form1.Main() in C:\Documents and
Settings\System Admin\My Documents\Visual Studio Projects\Data Access VB
App\Form1.vb:line 1
The majority of the code was generated by Visual Studio and based on the
error message it would seem that I have to add SQLBindParameter
statements, but I am not sure the syntax that I should be using. I am
new to VB.NET (coming from Java/J2EE) and haven't been able to come up
with a workable solution after pouring over the MSDN manuals. Here is
the generated code:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents OdbcDataAdapter1 As
System.Data.Odbc.OdbcDataAdapter
Friend WithEvents OdbcConnection1 As System.Data.Odbc.OdbcConnection
Friend WithEvents DsTags1 As Data_Access_VB_App.dsTags
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents btnUpdate As System.Windows.Forms.Button
Friend WithEvents btnLoad As System.Windows.Forms.Button
Friend WithEvents OdbcDataAdapter2 As
System.Data.Odbc.OdbcDataAdapter
Friend WithEvents OdbcSelectCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcInsertCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcConnection2 As System.Data.Odbc.OdbcConnection
Friend WithEvents OdbcDeleteCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcUpdateCommand2 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcSelectCommand1 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcInsertCommand1 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcDeleteCommand1 As System.Data.Odbc.OdbcCommand
Friend WithEvents OdbcUpdateCommand1 As System.Data.Odbc.OdbcCommand
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
Me.DsTags1 = New Data_Access_VB_App.dsTags
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.btnUpdate = New System.Windows.Forms.Button
Me.btnLoad = New System.Windows.Forms.Button
Me.OdbcDataAdapter2 = New System.Data.Odbc.OdbcDataAdapter
Me.OdbcDeleteCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcConnection2 = New System.Data.Odbc.OdbcConnection
Me.OdbcInsertCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcSelectCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcUpdateCommand2 = New System.Data.Odbc.OdbcCommand
Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcDeleteCommand1 = New System.Data.Odbc.OdbcCommand
Me.OdbcUpdateCommand1 = New System.Data.Odbc.OdbcCommand
CType(Me.DsTags1,
System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.DataGrid1,
System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'OdbcDataAdapter1
'
Me.OdbcDataAdapter1.DeleteCommand = Me.OdbcDeleteCommand1
Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
Me.OdbcDataAdapter1.TableMappings.AddRange(New
System.Data.Common.DataTableMapping() {New
System.Data.Common.DataTableMapping("Table", "epctag", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("ID", "ID"), New
System.Data.Common.DataColumnMapping("OBJECT_EPC", "OBJECT_EPC"), New
System.Data.Common.DataColumnMapping("READER_EPC", "READER_EPC"), New
System.Data.Common.DataColumnMapping("DATE_TIME", "DATE_TIME"), New
System.Data.Common.DataColumnMapping("PAYLOAD", "PAYLOAD"), New
System.Data.Common.DataColumnMapping("GTIN_DOMAIN", "GTIN_DOMAIN"), New
System.Data.Common.DataColumnMapping("GTIN_CLASS", "GTIN_CLASS")})})
Me.OdbcDataAdapter1.UpdateCommand = Me.OdbcUpdateCommand1
'
'OdbcConnection1
'
Me.OdbcConnection1.ConnectionString =
" STMT=;OPTION=3;DSN=EPCThingsNET;UID=root
;SOCKET=;DESC=MySQL ODBC 3.51
Driver DSN;" & _
" DATABASE=thingsnet;SERVER=localhost;PORT
=3306"
'
'DsTags1
'
Me.DsTags1.DataSetName = "dsTags"
Me.DsTags1.Locale = New
System.Globalization.CultureInfo("en-US")
'
'DataGrid1
'
Me.DataGrid1.DataMember = "epctag"
Me.DataGrid1.DataSource = Me.DsTags1
Me.DataGrid1.HeaderForeColor =
System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(8, 128)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.Size = New System.Drawing.Size(584, 264)
Me.DataGrid1.TabIndex = 0
'
'btnUpdate
'
Me.btnUpdate.Location = New System.Drawing.Point(224, 48)
Me.btnUpdate.Name = "btnUpdate"
Me.btnUpdate.Size = New System.Drawing.Size(152, 23)
Me.btnUpdate.TabIndex = 1
Me.btnUpdate.Text = "Save Changes in Database"
'
'btnLoad
'
Me.btnLoad.Location = New System.Drawing.Point(56, 40)
Me.btnLoad.Name = "btnLoad"
Me.btnLoad.TabIndex = 2
Me.btnLoad.Text = "Load Data"
'
'OdbcSelectCommand1
'
Me.OdbcSelectCommand1.CommandText = "SELECT ID, OBJECT_EPC,
READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, GTIN_CLASS FR" & _
"OM epctag"
Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
'
'OdbcInsertCommand1
'
Me.OdbcInsertCommand1.CommandText = "INSERT INTO epctag(ID,
OBJECT_EPC, READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, G" & _
"TIN_CLASS) VALUES (?, ?, ?, ?, ?, ?, ?)"
Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
0, "ID"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("OBJECT_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("READER_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("DATE_TIME",
System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("PAYLOAD",
System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
Me.OdbcInsertCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_CLASS",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
'
'OdbcDeleteCommand1
'
Me.OdbcDeleteCommand1.CommandText = "DELETE FROM epctag WHERE
(ID = ?)"
Me.OdbcDeleteCommand1.Connection = Me.OdbcConnection1
Me.OdbcDeleteCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "ID", System.Data.DataRowVersion.Original, Nothing))
'
'OdbcUpdateCommand1
'
Me.OdbcUpdateCommand1.CommandText = "UPDATE ecptag SET ID = ?,
OBJECT_EPC = ?, READER_EPC = ?, DATE_TIME = ?, PAYLOAD " & _
"= ?, GTIN_DOMAIN = ?, GTIN_CLASS = ? WHERE (ID = ?)"
Me.OdbcUpdateCommand1.Connection = Me.OdbcConnection1
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
0, "ID"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("OBJECT_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("READER_EPC",
System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("DATE_TIME",
System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("PAYLOAD",
System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
Me.OdbcUpdateCommand1.Parameters.Add(New
System.Data.Odbc.OdbcParameter("GTIN_CLASS",
System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(608, 398)
Me.Controls.Add(Me.btnLoad)
Me.Controls.Add(Me.btnUpdate)
Me.Controls.Add(Me.DataGrid1)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.DsTags1,
System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.DataGrid1,
System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnUpdate.Click
OdbcDataAdapter1.Update(DsTags1)
MessageBox.Show("Database Updated!")
End Sub
Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLoad.Click
OdbcDataAdapter1.Fill(DsTags1)
MessageBox.Show("Data Table Loaded Successfully!")
End Sub
End Class
That's the long and short of it! Appreciate any help.
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!You aren't binding the correct number of parameters for the update command.
You are expecting ODBC to use the "ID" parameter twice, but that wont
happen. You have to bind an OdbcParameter object for each '?'. If you have
8 parameter markers, you must bind 8 parameters. You are only binding 7
parameters.
Brannon
"Mikey G" <nospam@.devdex.com> wrote in message
news:#M02y8hsEHA.2808@.TK2MSFTNGP14.phx.gbl...
> Hi, I created a simple VB.NET 2003 application through Visual Studio
> that connects to a mysql database and loads a table into a Dataset, and
> then displays that table information in a DataGrid on a form for
> editing. The table fill works fine, the delete function works fine, but
> when I try to update a row, the application fails with the following
> error message:
> An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred
> in system.data.dll
> Additional information: System error.
> 'Data Access VB App.exe': Loaded
> 'c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50
> a3a\microsoft.visualbasic.dll', No symbols loaded.
> Unhandled Exception: System.Data.Odbc.OdbcException: ERROR [07002]
> [MySQL][ODBC 3.51 Driver][mysqld-4.0.21-debug]SQLBindParameter
not used
> for all parameters
> at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows,
> DataTableMapping tableMapping)
> at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String
> srcTable)
> at System.Data.Common.DbDataAdapter.Update(DataSet dataSet)
> at Data_Access_VB_App.Form1.btnUpdate_Click(Object sender, EventArgs
> e) in C:\Documents and Settings\System Admin\My Documents\Visual Studio
> Projects\Data Access VB App\Form1.vb:line 225
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProThe program '[2608] Data Acces
s
> VB App.exe' has exited with code 0 (0x0).
> c(Message& m)
> at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
> at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
> Int32 msg, IntPtr wparam, IntPtr lparam)
> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
> msg)
> at
> System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeM
> ethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32
> reason, Int32 pvLoopData)
> at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32
> reason, ApplicationContext context)
> at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason,
> ApplicationContext context)
> at System.Windows.Forms.Application.Run(Form mainForm)
> at Data_Access_VB_App.Form1.Main() in C:\Documents and
> Settings\System Admin\My Documents\Visual Studio Projects\Data Access VB
> App\Form1.vb:line 1
>
> The majority of the code was generated by Visual Studio and based on the
> error message it would seem that I have to add SQLBindParameter
> statements, but I am not sure the syntax that I should be using. I am
> new to VB.NET (coming from Java/J2EE) and haven't been able to come up
> with a workable solution after pouring over the MSDN manuals. Here is
> the generated code:
>
> Public Class Form1
> Inherits System.Windows.Forms.Form
> #Region " Windows Form Designer generated code "
> Public Sub New()
> MyBase.New()
> 'This call is required by the Windows Form Designer.
> InitializeComponent()
> 'Add any initialization after the InitializeComponent() call
> End Sub
> 'Form overrides dispose to clean up the component list.
> Protected Overloads Overrides Sub Dispose(ByVal disposing As
> Boolean)
> If disposing Then
> If Not (components Is Nothing) Then
> components.Dispose()
> End If
> End If
> MyBase.Dispose(disposing)
> End Sub
> 'NOTE: The following procedure is required by the Windows Form Designer
> 'It can be modified using the Windows Form Designer.
> 'Do not modify it using the code editor.
> Friend WithEvents OdbcDataAdapter1 As
> System.Data.Odbc.OdbcDataAdapter
> Friend WithEvents OdbcConnection1 As System.Data.Odbc.OdbcConnection
> Friend WithEvents DsTags1 As Data_Access_VB_App.dsTags
> Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
> Friend WithEvents btnUpdate As System.Windows.Forms.Button
> Friend WithEvents btnLoad As System.Windows.Forms.Button
> Friend WithEvents OdbcDataAdapter2 As
> System.Data.Odbc.OdbcDataAdapter
> Friend WithEvents OdbcSelectCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcInsertCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcConnection2 As System.Data.Odbc.OdbcConnection
> Friend WithEvents OdbcDeleteCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcUpdateCommand2 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcSelectCommand1 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcInsertCommand1 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcDeleteCommand1 As System.Data.Odbc.OdbcCommand
> Friend WithEvents OdbcUpdateCommand1 As System.Data.Odbc.OdbcCommand
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.OdbcDataAdapter1 = New System.Data.Odbc.OdbcDataAdapter
> Me.OdbcConnection1 = New System.Data.Odbc.OdbcConnection
> Me.DsTags1 = New Data_Access_VB_App.dsTags
> Me.DataGrid1 = New System.Windows.Forms.DataGrid
> Me.btnUpdate = New System.Windows.Forms.Button
> Me.btnLoad = New System.Windows.Forms.Button
> Me.OdbcDataAdapter2 = New System.Data.Odbc.OdbcDataAdapter
> Me.OdbcDeleteCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcConnection2 = New System.Data.Odbc.OdbcConnection
> Me.OdbcInsertCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcSelectCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcUpdateCommand2 = New System.Data.Odbc.OdbcCommand
> Me.OdbcSelectCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcInsertCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcDeleteCommand1 = New System.Data.Odbc.OdbcCommand
> Me.OdbcUpdateCommand1 = New System.Data.Odbc.OdbcCommand
> CType(Me.DsTags1,
> System.ComponentModel.ISupportInitialize).BeginInit()
> CType(Me.DataGrid1,
> System.ComponentModel.ISupportInitialize).BeginInit()
> Me.SuspendLayout()
> '
> 'OdbcDataAdapter1
> '
> Me.OdbcDataAdapter1.DeleteCommand = Me.OdbcDeleteCommand1
> Me.OdbcDataAdapter1.InsertCommand = Me.OdbcInsertCommand1
> Me.OdbcDataAdapter1.SelectCommand = Me.OdbcSelectCommand1
> Me.OdbcDataAdapter1.TableMappings.AddRange(New
> System.Data.Common.DataTableMapping() {New
> System.Data.Common.DataTableMapping("Table", "epctag", New
> System.Data.Common.DataColumnMapping() {New
> System.Data.Common.DataColumnMapping("ID", "ID"), New
> System.Data.Common.DataColumnMapping("OBJECT_EPC", "OBJECT_EPC"), New
> System.Data.Common.DataColumnMapping("READER_EPC", "READER_EPC"), New
> System.Data.Common.DataColumnMapping("DATE_TIME", "DATE_TIME"), New
> System.Data.Common.DataColumnMapping("PAYLOAD", "PAYLOAD"), New
> System.Data.Common.DataColumnMapping("GTIN_DOMAIN", "GTIN_DOMAIN"), New
> System.Data.Common.DataColumnMapping("GTIN_CLASS", "GTIN_CLASS")})})
> Me.OdbcDataAdapter1.UpdateCommand = Me.OdbcUpdateCommand1
> '
> 'OdbcConnection1
> '
> Me.OdbcConnection1.ConnectionString =
> " STMT=;OPTION=3;DSN=EPCThingsNET;UID=root
;SOCKET=;DESC=MySQL ODBC 3.51
> Driver DSN;" & _
> " DATABASE=thingsnet;SERVER=localhost;PORT
=3306"
> '
> 'DsTags1
> '
> Me.DsTags1.DataSetName = "dsTags"
> Me.DsTags1.Locale = New
> System.Globalization.CultureInfo("en-US")
> '
> 'DataGrid1
> '
> Me.DataGrid1.DataMember = "epctag"
> Me.DataGrid1.DataSource = Me.DsTags1
> Me.DataGrid1.HeaderForeColor =
> System.Drawing.SystemColors.ControlText
> Me.DataGrid1.Location = New System.Drawing.Point(8, 128)
> Me.DataGrid1.Name = "DataGrid1"
> Me.DataGrid1.Size = New System.Drawing.Size(584, 264)
> Me.DataGrid1.TabIndex = 0
> '
> 'btnUpdate
> '
> Me.btnUpdate.Location = New System.Drawing.Point(224, 48)
> Me.btnUpdate.Name = "btnUpdate"
> Me.btnUpdate.Size = New System.Drawing.Size(152, 23)
> Me.btnUpdate.TabIndex = 1
> Me.btnUpdate.Text = "Save Changes in Database"
> '
> 'btnLoad
> '
> Me.btnLoad.Location = New System.Drawing.Point(56, 40)
> Me.btnLoad.Name = "btnLoad"
> Me.btnLoad.TabIndex = 2
> Me.btnLoad.Text = "Load Data"
> '
> 'OdbcSelectCommand1
> '
> Me.OdbcSelectCommand1.CommandText = "SELECT ID, OBJECT_EPC,
> READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, GTIN_CLASS FR" & _
> "OM epctag"
> Me.OdbcSelectCommand1.Connection = Me.OdbcConnection1
> '
> 'OdbcInsertCommand1
> '
> Me.OdbcInsertCommand1.CommandText = "INSERT INTO epctag(ID,
> OBJECT_EPC, READER_EPC, DATE_TIME, PAYLOAD, GTIN_DOMAIN, G" & _
> "TIN_CLASS) VALUES (?, ?, ?, ?, ?, ?, ?)"
> Me.OdbcInsertCommand1.Connection = Me.OdbcConnection1
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
> 0, "ID"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("OBJECT_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("READER_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("DATE_TIME",
> System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("PAYLOAD",
> System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
> Me.OdbcInsertCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_CLASS",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
> '
> 'OdbcDeleteCommand1
> '
> Me.OdbcDeleteCommand1.CommandText = "DELETE FROM epctag WHERE
> (ID = ?)"
> Me.OdbcDeleteCommand1.Connection = Me.OdbcConnection1
> Me.OdbcDeleteCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
> 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
> Byte), "ID", System.Data.DataRowVersion.Original, Nothing))
> '
> 'OdbcUpdateCommand1
> '
> Me.OdbcUpdateCommand1.CommandText = "UPDATE ecptag SET ID = ?,
> OBJECT_EPC = ?, READER_EPC = ?, DATE_TIME = ?, PAYLOAD " & _
> "= ?, GTIN_DOMAIN = ?, GTIN_CLASS = ? WHERE (ID = ?)"
> Me.OdbcUpdateCommand1.Connection = Me.OdbcConnection1
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("ID", System.Data.Odbc.OdbcType.BigInt,
> 0, "ID"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("OBJECT_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "OBJECT_EPC"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("READER_EPC",
> System.Data.Odbc.OdbcType.VarChar, 255, "READER_EPC"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("DATE_TIME",
> System.Data.Odbc.OdbcType.VarChar, 255, "DATE_TIME"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("PAYLOAD",
> System.Data.Odbc.OdbcType.VarChar, 255, "PAYLOAD"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_DOMAIN",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_DOMAIN"))
> Me.OdbcUpdateCommand1.Parameters.Add(New
> System.Data.Odbc.OdbcParameter("GTIN_CLASS",
> System.Data.Odbc.OdbcType.VarChar, 255, "GTIN_CLASS"))
> '
> 'Form1
> '
> Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
> Me.ClientSize = New System.Drawing.Size(608, 398)
> Me.Controls.Add(Me.btnLoad)
> Me.Controls.Add(Me.btnUpdate)
> Me.Controls.Add(Me.DataGrid1)
> Me.Name = "Form1"
> Me.Text = "Form1"
> CType(Me.DsTags1,
> System.ComponentModel.ISupportInitialize).EndInit()
> CType(Me.DataGrid1,
> System.ComponentModel.ISupportInitialize).EndInit()
> Me.ResumeLayout(False)
> End Sub
> #End Region
> Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e
> As System.EventArgs) Handles btnUpdate.Click
> OdbcDataAdapter1.Update(DsTags1)
> MessageBox.Show("Database Updated!")
> End Sub
> Private Sub btnLoad_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btnLoad.Click
> OdbcDataAdapter1.Fill(DsTags1)
> MessageBox.Show("Data Table Loaded Successfully!")
> End Sub
> End Class
>
> That's the long and short of it! Appreciate any help.
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!