?
Solved

JDBC/ODBC interface MS SQL Server

Posted on 2008-11-03
16
Medium Priority
?
765 Views
Last Modified: 2013-12-13
I have a MS SQL Server database on my laptop set up, but I don't think
I have eclipse.  What is the easiest way to connect to my database
utilizing java I also need to access it with a "scripting language"
0
Comment
Question by:kayvey
  • 11
  • 4
16 Comments
 

Author Comment

by:kayvey
ID: 22873975
0
 

Author Comment

by:kayvey
ID: 22874110
I've got 35 minutes left I am jhosed.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22876399
0
 

Author Comment

by:kayvey
ID: 22883389
that first link talks about SQL Server 2005.  I have SQL Server 2008 does this matter?
0
 

Author Comment

by:kayvey
ID: 22883444
I was looking at these leafy pages but this stuff gives me stomach aches  {:P I learned c on unix
command lines  and 10 years later I decided to try "Windows Progamming" but I don't know I got
sick of all the mire. Java makes me dizzy but I got used to installing it on FreeBSD command lines.
I feel so much more comfortable on those command lines sometimes than all the stupid windows out
of control.  Library of congress stuff bothers me too. And eclipse.  I am real irritated with eclipse
right now.  I can javac on an MS-DOS prompt just fine or better do makefiles.. It seems like
there are too many stupid windows fighiting with each other in more and more stupid ways
and It drivesme crazy.  that little code snippet should work mauybe I just have togetit
connected and get a simple SQLdone and I gethalf credit by tomorrowatmidnightmaybe

I have bandaids on two fingers and it is messing up my typing.  Sorry.
0
 

Author Comment

by:kayvey
ID: 22883446
SQL is better because it is more like a command line.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22885329
No, it should not matter the version.  At least not from my understanding.  You can check if they have updated the JDBC driver.

The code implementation should be consistent though and the 2nd link shows you how and an IDE is not required as long as you code the java so it compiles you are fine.  I use IDE simply for the color coding -- I usually have all the other panes in Eclipse unpinned so I see my code pane full screen and can quickly see when I made a type-o or hit the caps key by accident. :)

I use to use TextPad++ for that too.

Just a nicety...I like hand coding myself too, but guess I do also like the convenience of focusing on the code and not compilation so I do use the build features there too especially for debugging view.

Anyway, those links were my thinking you were saying you needed an IDE. :)  The first two links are all you need to get going on JDBC to SQL Server.
0
 

Author Comment

by:kayvey
ID: 22891152
Okay.  I talked to the TA and he pointed out that I didn't follow directions they had for JDBC. I got
to the point where SQL Server was installed (but not properly configured for JDBC) and it said
"Congradulations" and I thought I was done. I didn't notice there were 20 more pages in the
instruction document.

The professor said I have to reinstall the whole shebang.  I will give you points now if you
help me save the work that I have done. I am not using my Vista computer right now I am
on a SUN workstation running X in Berzerkeley.  I have a bunch of screenshots on my other
stuff.. the "hw7" databse is in "databases" in the SQL.  How can I save my database so I can
get it up after I reinstall everything..

Incidentally, the TA told me that I had only JRE and not JDK.  It slipped my mind because I run
dual boot with FreeBSD on the other partition.. also I have 3 HDs with 8 total partitions, with
5 OSes total (two instances of Vista, one all mucked up.. 3 instances of FreeBSD, one all
mucked up.. one on a HD that makes scary sounds (also containing a mucked up VIsta,  
and my newest HD mistakenly with 4 parititions (and an area of disk space I decided to
not allocate thinking it would help with the 95% rule but maybe that was stupid).. I meant
to make the 4 slices but I made 4 partitions so one partition is mounted on /, another is swap,
a third I thin is /var and the final one is /usr.. it boot s up and MBR gives me 4 idientical
FreeBSD choices.
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22891302
For java source, tar/zip files and save them somewhere portable. :)

For SQL, backup database and save the .bak file on same remote storage as above.

For JDK, go here:
http://java.sun.com/javase/downloads/?intcmp=1281

Good luck!
0
 

Author Comment

by:kayvey
ID: 22892536
I want my "hw7" database but look at the state of SQL Server
turrbleCrash.jpg
0
 

Author Comment

by:kayvey
ID: 22892550
the only way I was accessing "hw7" was by navigating SQL server.  what can I do now?  can
I save the files I created with this application and access them again after I uninstall it and reinstall
it?  if you help me do that I will give you points.
0
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 22894162
You will need to have remote connections turned on for SQL Server as the error suggests.  You will find this under the configuration tools for SQL.  You want TCP/IP protocol enabled.

Once you get connected just backup the database as already suggested.

Hope that helps...
0
 

Author Comment

by:kayvey
ID: 22901186
The application is broken  beyond repair.  Couldn't you see that I was attempting to connect?  Nobody
knows how to fix it.  The problem is to make sure the data is somewhere I can restore it after uninstall and reinstall.  

I'm sorry.  If it were easy, I wouldn't have asked it! I warned you!  {:}
0
 
LVL 62

Expert Comment

by:gheist
ID: 22966570
I do not understand where you have connection problems - in .net management studio or java?
Any error messages from jtds?
0
 

Author Comment

by:kayvey
ID: 22969540
The professor says the installation of SQL server is hosed.  I haven't been messing too much with the .NET studio.. deadline past.  At this point I will give points for teaching me to save my database without connecting, or reconnecting and saving or making SQL server work.  The professor said to reinstall SQL server.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This video teaches viewers about errors in exception handling.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question