POV-Ray : Newsgroups : povray.off-topic : ODBC Server Time
9 Oct 2024 14:32:25 EDT (-0400)
  ODBC (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Mike Raiford
Subject: Re: ODBC
Date: 2 Feb 2009 15:50:02
Message: <49875c7a$1@news.povray.org>
Orchid XP v8 wrote:
> As I understand it, M$ Access is just a graphical frontend for the M$ 
> Jet engine, which actually comes with Windows itself. Does that mean I 
> can configure an ODBC connection to an Access database, even though I 
> don't have access?

You might need this:

http://www.microsoft.com/downloads/details.aspx?FamilyID=2deddec4-350e-4cd0-a12a-d7f70a153156&DisplayLang=en


> 
> More generally, does anybody here know how to work ODBC?
> 

ODBC is relatively simple, but, Gail could probably help... maybe..

-- 
~Mike


Post a reply to this message

From: Orchid XP v8
Subject: Re: ODBC
Date: 2 Feb 2009 15:52:24
Message: <49875d08$1@news.povray.org>
>> Does that mean I 
>> can configure an ODBC connection to an Access database, even though I 
>> don't have access?
> 
> You might need this:
> 
>
http://www.microsoft.com/downloads/details.aspx?FamilyID=2deddec4-350e-4cd0-a12a-d7f70a153156&DisplayLang=en


Mmm, OK.

(Failing that, I just use one of the machines at work... muhuhuhu!)

>> More generally, does anybody here know how to work ODBC?
>>
> 
> ODBC is relatively simple, but, Gail could probably help... maybe..

This is my feeling also. ;-)

I have actually had cause to meddle with ODBC a very little in the past. 
But considering I want to attempt to develop a program that talks to a 
database, if it doesn't work I won't know if my program is wrong, the 
ODBC library is broken, or I just haven't configured ODBC correctly! :-S

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Halbert
Subject: Re: ODBC
Date: 2 Feb 2009 15:53:29
Message: <49875d49$1@news.povray.org>
You can actually manipulate the database programatically.  I haven't used 
Access in years so I don't remember the specifics of creating a connection, 
using the cursors, etc. If you don't actually have Access, I can't really 
see why you might want to do that though.

-- 


Post a reply to this message

From: Orchid XP v8
Subject: Re: ODBC
Date: 2 Feb 2009 15:55:57
Message: <49875ddd$1@news.povray.org>
Halbert wrote:
> You can actually manipulate the database programatically.  I haven't used 
> Access in years so I don't remember the specifics of creating a connection, 
> using the cursors, etc. If you don't actually have Access, I can't really 
> see why you might want to do that though.

Purely for test purposes. I want to write a trivial DB application to 
check that the library for writin DB applications works correctly.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Halbert
Subject: Re: ODBC
Date: 2 Feb 2009 17:09:06
Message: <49876f02$1@news.povray.org>
I can tell you that to access Access, the usual API is DAO 
(http://en.wikipedia.org/wiki/Data_Access_Objects). Using ODBC and Access I 
think you would need to have the database already created to create a DSN; 
you need a file to which it will point. If you don't have Access you might 
be able to start with a populated mdb then drop the tables you don't need 
then create the ones you do though.

-- 


Post a reply to this message

From: Tom Austin
Subject: Re: ODBC
Date: 3 Feb 2009 09:01:39
Message: <49884e43$1@news.povray.org>
Orchid XP v8 wrote:
> As I understand it, M$ Access is just a graphical frontend for the M$ 
> Jet engine, which actually comes with Windows itself. Does that mean I 
> can configure an ODBC connection to an Access database, even though I 
> don't have access?
> 
> More generally, does anybody here know how to work ODBC?
> 

There are a bunch of options to open a .mdb without MS Access.

MS Access just gives you a pretty front end - it can be useful in 
creating a new database and tables, but isn't required.  In fact, I have 
not used MS Access in several years, tho just about all of our data is 
in .mdb files.


I personally stay from ODBC because it requires a setup on each computer.

I usually access the file directly through code.


small example in .NET - forgive the line wraps
******************************
Private Function GetSCIDandUTMTable(ByVal databasePath As String) As 
System.Data.DataTable

	Dim myDatabaseConnection As System.Data.OleDb.OleDbConnection

	myDatabaseConnection = New 
System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data 
Source= " & databasePath)

	myDatabaseConnection.Open()

	Dim queryString As String

	queryString = "select"
	queryString &= " SCID"
	queryString &= ",WorldX"
	queryString &= ",WorldY"
	queryString &= " from"
	queryString &= " myInfoStore"

	Dim myDataAdapter As System.Data.OleDb.OleDbDataAdapter = Nothing
	Dim myDataSet As New System.Data.DataSet
	Dim myDataView As System.Data.DataView
	Dim myDataTable As System.Data.DataTable


	myDataAdapter = New System.Data.OleDb.OleDbDataAdapter(queryString, 
myDatabaseConnection)
	myDataAdapter.Fill(myDataSet, "MyData")

	myDatabaseConnection.Close()

	myDataView = New System.Data.DataView(myDataSet.Tables("MyData"))
	myDataTable = myDataView.Table

	Return myDataTable

End Function
************************************************



In my case we don't keep one large dataset, we have a separate .mdb for 
each job that we work on - so literally hundreds of .mdb files.

Our tools are designed to allow the sure to easily select the .mdb file 
they are working with.





Tom


Post a reply to this message

From: Invisible
Subject: Re: ODBC
Date: 3 Feb 2009 09:04:22
Message: <49884ee6$1@news.povray.org>
Tom Austin wrote:

> There are a bunch of options to open a .mdb without MS Access.
> 
> MS Access just gives you a pretty front end - it can be useful in 
> creating a new database and tables, but isn't required.  In fact, I have 
> not used MS Access in several years, tho just about all of our data is 
> in .mdb files.
> 
> 
> I personally stay from ODBC because it requires a setup on each computer.

My goal isn't to access an MDB file; my goal is to use an MDB file to 
test whether my ODBC program works correctly. ;-)

 From the other responses, it looks like it should be feasible to do 
this. Time to start playing, I think...


Post a reply to this message

From: Tom Austin
Subject: Re: ODBC
Date: 3 Feb 2009 09:24:42
Message: <498853aa$1@news.povray.org>
Invisible wrote:
> Tom Austin wrote:
> 
>> There are a bunch of options to open a .mdb without MS Access.
>>
>> MS Access just gives you a pretty front end - it can be useful in 
>> creating a new database and tables, but isn't required.  In fact, I 
>> have not used MS Access in several years, tho just about all of our 
>> data is in .mdb files.
>>
>>
>> I personally stay from ODBC because it requires a setup on each computer.
> 
> My goal isn't to access an MDB file; my goal is to use an MDB file to 
> test whether my ODBC program works correctly. ;-)
> 
>  From the other responses, it looks like it should be feasible to do 
> this. Time to start playing, I think...

That's one of the nice things about ODBC - you can repoint it without 
having to modify code that uses it.

It's been almost 10 years since I last used ODBC - sorry, not  much help 
there.


Tom


Post a reply to this message

From: Invisible
Subject: Re: ODBC
Date: 3 Feb 2009 09:34:13
Message: <498855e5$1@news.povray.org>
>> My goal isn't to access an MDB file; my goal is to use an MDB file to 
>> test whether my ODBC program works correctly. ;-)
> 
> That's one of the nice things about ODBC - you can repoint it without 
> having to modify code that uses it.

The library I'm using supports ODBC, and also supports the native 
protocols of a few specific DBs, but I think learning to work ODBC once 
is probably my best bet. ;-)

> It's been almost 10 years since I last used ODBC - sorry, not  much help 
> there.

No worries.


Post a reply to this message

From: Patrick Elliott
Subject: Re: ODBC
Date: 4 Feb 2009 00:53:40
Message: <49892d64$1@news.povray.org>
Orchid XP v8 wrote:
> As I understand it, M$ Access is just a graphical frontend for the M$ 
> Jet engine, which actually comes with Windows itself. Does that mean I 
> can configure an ODBC connection to an Access database, even though I 
> don't have access?
> 
> More generally, does anybody here know how to work ODBC?
> 
Note however.. Some ODBC drivers do not provide access to the set of DB 
management functions needed to "create" new DBs and tables, or they 
require that you access the driver differently, depending on if you are 
"creating" a DB, or just accessing its contents to read and write to it. 
Took me a bit of hunting to figure that one out, since it wasn't 
entirely "obvious", given most examples of "accessing" the data have the 
bad habit of "assuming" the table already exists to "be" accessed. :p

-- 
void main () {

     if version = "Vista" {
       call slow_by_half();
       call DRM_everything();
     }
     call functional_code();
   }
   else
     call crash_windows();
}

<A HREF='http://www.daz3d.com/index.php?refid=16130551'>Get 3D Models, 
3D Content, and 3D Software at DAZ3D!</A>


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.