Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3976376
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:47:50+00:00 2026-05-20T04:47:50+00:00

I can not retrieve data from db in sql server. I use the c3p0

  • 0

I can not retrieve data from db in sql server.

I use the c3p0 as the pool,this is the c3p0.properties:

c3p0.user=test
c3p0.password=123456
c3p0.jdbcUrl=jdbc:sqlserver://xxxxxx:1433;databaseName=TIMDB;SelectMethod=cursor
c3p0.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
c3p0.maxPoolSize=15
c3p0.testConnectionOnCheckin=true
c3p0.idleConnectionTestPeriod=3600

In the sql server,I have create a new user named test,and its default db is TIMDB,the server roles is public,and this is the user mapping:
enter image description here

But when I start the application,I can get nothing.

From the log created by log4j,I can get the sql used to retrieve data,but if I copy the sql to the sql management stutio and create a new query,I can retrieve some data.

I wonder why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:47:50+00:00Added an answer on May 20, 2026 at 4:47 am

    It looks like a permissions problem to me. If the generated SQl runs when you use it in management studio (i.e under your user account) then you know the code is good. What access have you given the user “test” from your post I see “user mapping: enter image description here”? he will need at least db_datareader and possibly more depending on what code is generated.

    You could also try logging on to SQL Management studio under your “test” user and see if you can execute the code. That will eliminate the possibility that its something wrong with your application/network.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that a SQL Server full text index can not index more than
I can not control the scrolling of a scrollpane from within my actionscript (I
I just noticed that you can not use standard math operators on an enum
When reading from a IO::Socket::INET filehandle it can not be assumed that there will
I need retrieve data from 2 tables at the same time, the tables are
I am successfully querying data in a Sql Server CE database using the TableDirect
I'm using Hibernate to retrieve some data from a database. The result set returned
I can not distinguish the difference between aggregating and holding. What does it mean
I am on a shared host and can not change the symbolic link to
Does GWT has LazyPanel .I can not see it .Please let me know .If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.