Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Wednesday, March 28, 2012

Problem with blob field in SQL Server

In SQLServer database i have stored a blob using updateblob function,
type of the table column is image.
When i use Selectblob statement to get the blob into a blob variable, i am getting only 32 KB of data. But with ASA i am getting the complete data..
How to get Complete data in SQL Server?

regds.,
rangaWhich data provider are you using?

Terrisql

Wednesday, March 21, 2012

Problem with a foreing key

I'm a beginner in using SQLServer and I 'm trying to bring a db Schema
written for DB2 into SQLServer.
My problem is this: using a tool to translate the script for creating the
DB, I obtain the following code:

ALTER TABLE PROJECT.RSURETTA ADD FOREIGN KEY(VOCE )
REFERENCES PROJECT.RSANVOCE(VOCE ) ON DELETE SET NULL ON UPDATE NO ACTION

But, when I try to run the script the system says:

Incorrect syntax near the keyword 'SET'.

Can I assign a null value to an other table with a reference?

Thank you
Fede"Federica T" <fedina_chicca@.N_O_Spam_libero.it> wrote in message
news:cjbp73$h69$1@.atlantis.cu.mi.it...
> I'm a beginner in using SQLServer and I 'm trying to bring a db Schema
> written for DB2 into SQLServer.
> My problem is this: using a tool to translate the script for creating the
> DB, I obtain the following code:
> ALTER TABLE PROJECT.RSURETTA ADD FOREIGN KEY(VOCE )
> REFERENCES PROJECT.RSANVOCE(VOCE ) ON DELETE SET NULL ON UPDATE NO
> ACTION
> But, when I try to run the script the system says:
> Incorrect syntax near the keyword 'SET'.
> Can I assign a null value to an other table with a reference?
> Thank you
> Fede

No - SET NULL is not implemented in MSSQL 2000 (I think it will be in MSSQL
2005); the only options are NO ACTION or CASCADE. If you need this
functionality, then triggers would probably be the best way to go, or
perhaps a stored procedure which performs the DELETE and also sets the
values to NULL in the referencing table.

Simon|||"Simon Hayes" <sql@.hayes.ch> ha scritto nel messaggio
news:41596f8d_2@.news.bluewin.ch...
> No - SET NULL is not implemented in MSSQL 2000 (I think it will be in
MSSQL
> 2005); the only options are NO ACTION or CASCADE. If you need this
> functionality, then triggers would probably be the best way to go, or
> perhaps a stored procedure which performs the DELETE and also sets the
> values to NULL in the referencing table.
Thank you!
Fede

problem With 2000 client

One Winn 2000 workstatiom has problem with ACCESS 2003 ODBC conection to SQL
server on WIN 2003 server. Other clients are all WINXP. This cient is on the
different domain too. Some reports works, and some have error, ask for
password again but not accept it even if it is supplied again. Application
on other clients works well.
What can be reason for this error.
Thanks in advanced.
Hi Zeljko,
From your description, I know that when you are connecting SQL Server 2000
on Windows 2003 with your Access 2003 installed on Windows 2000
Workstation, some reports will not work proper. Have I fully understand the
issue?
Would you please give me more information for that?
1. For those cannot be opened report, do they have some common controls,
such as Combo box or Subform?
2. Will it be OK when under the same domian? (still using Access 2003 on
Windows 2000)
3. You are using ADP, isn't it? Would please please give the error message
when it ask you Login information again? or please give me more description
about asking for password
4. Have you have the latest upgrade of Windows 2000, which should be
Windows 2000 Service Pack 4
Please apply my suggestions above and let me know if this helps resolve
your problem. If there is anything more I can do to assist you, please feel
free to post it in the group
Sincerely yours,
Michael Cheng
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, many thanks.
|||Hi Zeljko,
I am currently standing by for an update from you and would like to know
how things are going there. Should you have any questions or concerns on
the recent questions I've posted, please don't hesitate to let me know
directly. It's my pleasure to be of assistance
Sincerely yours,
Michael Cheng
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, many thanks.
sql

problem With 2000 client

One Winn 2000 workstatiom has problem with ACCESS 2003 ODBC conection to SQL
server on WIN 2003 server. Other clients are all WINXP. This cient is on the
different domain too. Some reports works, and some have error, ask for
password again but not accept it even if it is supplied again. Application
on other clients works well.
What can be reason for this error.
Thanks in advanced.Hi Zeljko,
From your description, I know that when you are connecting SQL Server 2000
on Windows 2003 with your Access 2003 installed on Windows 2000
Workstation, some reports will not work proper. Have I fully understand the
issue?
Would you please give me more information for that?
1. For those cannot be opened report, do they have some common controls,
such as Combo box or Subform?
2. Will it be OK when under the same domian? (still using Access 2003 on
Windows 2000)
3. You are using ADP, isn't it? Would please please give the error message
when it ask you Login information again? or please give me more description
about asking for password
4. Have you have the latest upgrade of Windows 2000, which should be
Windows 2000 Service Pack 4
Please apply my suggestions above and let me know if this helps resolve
your problem. If there is anything more I can do to assist you, please feel
free to post it in the group
Sincerely yours,
Michael Cheng
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, many thanks.|||Hi Zeljko,
I am currently standing by for an update from you and would like to know
how things are going there. Should you have any questions or concerns on
the recent questions I've posted, please don't hesitate to let me know
directly. It's my pleasure to be of assistance
Sincerely yours,
Michael Cheng
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, many thanks.

Monday, February 20, 2012

Problem using Access 2000 as a front-end to SQL Server 2000 tables

I've created a small company database where the tables reside in a SQL
Server database. I'm using Access 2000 forms for a front end.

I've got a System DSN set-up to SQL Server and am using links within
Access 2000 to get to the SQL Server tables.

My forms worked fine until I made a few minor changes to the database
schema on SQL Server (e.g. added a foreign key, or added a column).
After that, all the links break - I click on a table link and get an
error msg like "invalid object name."

Deleting the links after a schema change and re-adding the links seemed
to fix the problem. The forms I'd already created seemed to work fine
after re-creating the links.

But then I got more advanced with my forms. I have it set up so that
for certain entry fields, the combobox gets populated with values from
a table (the description appears in the drop-down and the corresponding
primary key value gets populated in the table). I created a number of
forms using this technique, entered data, and everything worked fine.
Made a small schema change and it broke everything -- not the actual
table links, but the functionality for the drop-downs. My values no
longer appeared, and this was true for forms that accessed tables whose
schemas did not change.

This is driving me nuts. Is there any way to keep my forms from
breaking each time I make a small schema change?

Thanks.

- DanaHI,

Have a similar setup here and found that it's just easier to have
comboboxes populated by a local table. It's al depending if the values
you are looking for changes all the time.

Grtz

Daniels|||Hate to say it, but it would be a good idea to sort out the design of
your data before jumping in to developing the application. It would
avoid issues such as this in most cases. OK, so there will be occasions
where you will need to make changes to the structure, but it is a
feature of linked tables in Access and nothing to do with SQL that is
causing you the problems. It should be easy enough to refresh the
links, and if your application is coded properly, you shouldn't have
too many issues picking up the changes.

I would recommend seeking further advice from :

http://groups.google.com/groups?hl=...bases.ms-access|||<dananrg@.yahoo.com> wrote in message
news:1106079114.508343.35830@.f14g2000cwb.googlegro ups.com...
> I've created a small company database where the tables reside in a SQL
> Server database. I'm using Access 2000 forms for a front end.
> I've got a System DSN set-up to SQL Server and am using links within
> Access 2000 to get to the SQL Server tables.
> My forms worked fine until I made a few minor changes to the database
> schema on SQL Server (e.g. added a foreign key, or added a column).
> After that, all the links break - I click on a table link and get an
> error msg like "invalid object name."
> Deleting the links after a schema change and re-adding the links seemed
> to fix the problem. The forms I'd already created seemed to work fine
> after re-creating the links.

Access stores a definition of the tables when you link them.
You need to refresh this if you change the sql server database since
there'll be a mis-match otherwise.
If you search using google on the access database you can find code which'd
do this.

> But then I got more advanced with my forms. I have it set up so that
> for certain entry fields, the combobox gets populated with values from
> a table (the description appears in the drop-down and the corresponding
> primary key value gets populated in the table). I created a number of
> forms using this technique, entered data, and everything worked fine.
> Made a small schema change and it broke everything -- not the actual
> table links, but the functionality for the drop-downs. My values no
> longer appeared, and this was true for forms that accessed tables whose
> schemas did not change.
> This is driving me nuts. Is there any way to keep my forms from
> breaking each time I make a small schema change?
> Thanks.
> - Dana

Write the forms after you have designed your database.

It's like building a house.
First off you design the whole thing.
Put your plans together.
Then you do the foundations...
Then the walls.
Then the roof.

You don't start building anything before you have the plans.

In this simile, your database is the foundations.
Change them and anything you already built will fall down.

--
Regards,
Andy O'Neill|||Dana,

If designing the database completely and not making any changes to it is not
an option for, you try one of these.

1. Do all your work in Access while building the App in access when you are
finished use the database splitter and upsizing wizard to move to SQL when
finished.

2. Try using a Access project instead of a access database, projects sit
directly on top of a SQL database, so some of your linked table blues may
disappear ( as well as the need for DSN's)

HTH

Regards

Reg Besseling

<dananrg@.yahoo.com> wrote in message
news:1106079114.508343.35830@.f14g2000cwb.googlegro ups.com...
> I've created a small company database where the tables reside in a SQL
> Server database. I'm using Access 2000 forms for a front end.
> I've got a System DSN set-up to SQL Server and am using links within
> Access 2000 to get to the SQL Server tables.
> My forms worked fine until I made a few minor changes to the database
> schema on SQL Server (e.g. added a foreign key, or added a column).
> After that, all the links break - I click on a table link and get an
> error msg like "invalid object name."
> Deleting the links after a schema change and re-adding the links seemed
> to fix the problem. The forms I'd already created seemed to work fine
> after re-creating the links.
> But then I got more advanced with my forms. I have it set up so that
> for certain entry fields, the combobox gets populated with values from
> a table (the description appears in the drop-down and the corresponding
> primary key value gets populated in the table). I created a number of
> forms using this technique, entered data, and everything worked fine.
> Made a small schema change and it broke everything -- not the actual
> table links, but the functionality for the drop-downs. My values no
> longer appeared, and this was true for forms that accessed tables whose
> schemas did not change.
> This is driving me nuts. Is there any way to keep my forms from
> breaking each time I make a small schema change?
> Thanks.
> - Dana|||Thanks everyone for your replies.

- Dana

problem using "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver

hi
I am using "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver to connect
the SQL Server 2000.
Everything is ok if there is one request to the SQL server.
When there are more than one requests to the SQL server, exception was
thrown
I want to ask if that driver has some problems to handle multi-request.
Thanks
The expcetions are:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has
been closed.
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseResultSet.validateClos edState(Unknown
Source)
at
com.microsoft.jdbc.base.BaseResultSet.commonFetchI nitialize(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.next(Unknown Source)
at GetData.GetData.getColumn(GetData.java:192)
at GetData.GetData.insert_fileInstance_table(GetData. java:1156)
at RadicaPocketServer2.handleRequest(RadicaPocketServ er2.java:1056)
at RadicaPocketServer2.doPost(RadicaPocketServer2.jav a:55)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp1 3Processor.java:466)
at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Pro cessor.java:585)
at java.lang.Thread.run(Thread.java:534)
Hello Joe
Thanks for you suggestion, but I still have questions about it.
My servlet is run in tomcat 5.0 and I know that tomcat help us to handle
multiple threading problem
Could you explain your idea to me more. Thank you
Also, I have written a class called GetData.java which represent to connect
and execute SQL statement.
GetData is used by my servlet program to handle database connections
Do you mean that I need to handle mutli-threading in GetData.java's
functions
Thank you very much
Simon Lee
"Joe Weinstein" <joeNOSPAM@.bea.com> ? news:407FFE48.30900@.bea.com ?...[vbcol=seagreen]
> Hi.
> the problem is probably just that your servlet code is not thread-safe.
> Multiple threads are probably trying to use the same jdbc objects.
> Define all your jdbc objects as method-level variables and you should
> be OK...
> Joe Weinstein at BEA
> Simon Lee wrote:
connect[vbcol=seagreen]
has[vbcol=seagreen]
com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown[vbcol=seagreen]
com.microsoft.jdbc.base.BaseResultSet.validateClos edState(Unknown[vbcol=seagreen]
Source)[vbcol=seagreen]
RadicaPocketServer2.handleRequest(RadicaPocketServ er2.java:1056)[vbcol=seagreen]
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Application[vbcol=seagreen]
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterCh[vbcol=seagreen]
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.ja[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)[vbcol=seagreen]
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.ja[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)[vbcol=seagreen]
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)[vbcol=seagreen]
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:509)[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)[vbcol=seagreen]
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
>

Problem Upgrading from SQL Server 2000 to SQLServer 2005

My upgrade of SQL Server 2000 to SQL Server 2005 is being blocked as follows:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

FTCATALOGPATH

DEPRECATEDSP

FTCATALOGNAMERESTRICTION

FTNONPERSISTEDCOMPCOL

Many thanks

JMX

Can you supply the upgrade command that you are running? And which versions/editions are you going from and to?

Thanks,
Sam Lester (MSFT)

Problem Upgrading from SQL Server 2000 to SQLServer 2005

My upgrade of SQL Server 2000 to SQL Server 2005 is being blocked as follows:

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

FTCATALOGPATH

DEPRECATEDSP

FTCATALOGNAMERESTRICTION

FTNONPERSISTEDCOMPCOL

Many thanks

JMX

Can you supply the upgrade command that you are running? And which versions/editions are you going from and to?

Thanks,
Sam Lester (MSFT)