iNET Interactive - Online Advertising Agency
          
Go Back  Xtreme .NET Talk > .NET > Database / XML / Reporting > Bug in ODBC.net Driver ??


Reply
 
Thread Tools Display Modes
  #1  
Old 01-21-2003, 05:56 AM
Kaliffen Kaliffen is offline
Newcomer

Preferred language:
vb.net, C#, java
 
Join Date: Jan 2003
Location: -
Posts: 5
Default Bug in ODBC.net Driver ??

Working in vb.net, I am connecting to a Paradox 8.0 database trhough the odbc.net driver. Everything is working fine, But for all boolean fields. They seem to have no consistency in values whatsoever. Thus i get unpredictable results, that are NOT comming from the database.

I have testet this in the simplet enviroment possible (only one class, one method etc) and the error is still there

Any help would be very appreciated.

connString as string =
"Driver={Microsoft Paradox Driver (*.db )};" & _ "DriverID=538;" & _
"Fil=Paradox 8.X;" & _
"DefaultDir=" & dataSource & _
";Dbq=" & dataSource & _
";CollatingSequence=ASCII;" & _
"Uid=" & userid & ";Pwd=" & password & ";"
ODBCConnection = New OdbcConnection(ConnString)

When i do a select on a paradox 8 databse the boolean fields are random! no predictable sequence in them

The bug seems to be in the driver as a sqlConnection to a MsSql database with the SAME CODE AROUND IT do not produce the error.
Microsoft Visual Basic .NET 55537-640-4091527-18564
__________________
/ab
Reply With Quote
  #2  
Old 01-21-2003, 09:46 AM
Robby's Avatar
Robby Robby is offline
Ultimate Contributor
 
Join Date: Nov 2002
Location: Montreal, Ca.
Posts: 3,461
Default

Does it throw an exception or just unpredictable results?

What does your Connection object look like?
__________________
Visit...Bassic Software
Reply With Quote
  #3  
Old 01-22-2003, 02:27 AM
Kaliffen Kaliffen is offline
Newcomer

Preferred language:
vb.net, C#, java
 
Join Date: Jan 2003
Location: -
Posts: 5
Default no exception

No it returns un predictable results.

I have written at testsuite in NUnit and it was this test suite that caught the boolean mistakes. Actually im kinda ed. because the error occurs out of my scope. When the dataadapter fx fills the dataset, the data is already corrupt. And yes im sure its the right database i have queried it myself.

some source:

in an button event handler---

Dim sqlString As String
Dim sqlComm As SqlCommand
Dim dr As SqlDataReader
Dim wheres As New Hashtable()

pool = ConnectionPool.getSingletonObject
Dim sqlconn As SqlConnection = pool.getSqlConnection("lopis", "localhost", "sa", "")

Dim provider As New SqlProvider()

wheres.Clear()
wheres.Add("BoreHoleID", "50")

'' the sql provider generates sql for us "select * where..."
sqlString = provider.getSelectSql("BoreHole", wheres)
sqlComm = New SqlCommand(sqlString, sqlconn)
'' actually execute the query
sqlconn.Open()

dr = sqlComm.ExecuteReader()
dr.Read()

'' GAH THIS VALUE IS RANDOM?!?!?!
MsgBox(dr.GetBoolean(17))

end sub

'' some source from connection pool ''


Public Function getSqlConnection(ByVal dataSource As String, ByVal ip As String, ByVal userid As String, ByVal password As String) As SqlConnection
Dim myConnString As String
myConnString = "server=" & ip & ";database=" & dataSource & ";User id=" & userid & ";password=" & password & ";"
Dim myConnSql As New SqlConnection(myConnString)
Return myConnSql
End Function


(dont mind line brakes)

im pretty sure is the driver that bug me.

Any alternatives to ODBC.net in connecting to paradox 8 ?!?!?!

really need help here...
__________________
/ab
Reply With Quote
  #4  
Old 01-22-2003, 08:48 AM
Nerseus's Avatar
Nerseus Nerseus is offline
Danner

Preferred language:
C#
 
Join Date: Oct 2002
Location: Arizona, USA
Posts: 2,547
Default

I don't have any experience with Paradox so this question may be naive... does Paradox support a Boolean that ADO.NET recognizes? I know that DB2 doesn't support a "bit" column like SQL Server - you must use a char(1) and interpret the value yourself.

-ner
__________________
"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Reply With Quote
  #5  
Old 01-24-2003, 02:23 AM
Kaliffen Kaliffen is offline
Newcomer

Preferred language:
vb.net, C#, java
 
Join Date: Jan 2003
Location: -
Posts: 5
Default no go!

well the paradox system has a Logical field (L) which is nothing more than a bit.

when i get more time i will mess with the code and maybe make an article on the subject... anyhow paradox 8 and odbc.net is not recommended together

I might have to port the entire project's data to access

/puff and out
__________________
/ab
Reply With Quote
  #6  
Old 01-29-2003, 04:20 AM
Kaliffen Kaliffen is offline
Newcomer

Preferred language:
vb.net, C#, java
 
Join Date: Jan 2003
Location: -
Posts: 5
Default its the driver (from hell)

well now i have ported the code to work with access trough the SAME ODBC driver!!! this works perfect.

I guess microsoft dident want to support paradox at all in their new smartypants framework. sucky!

Well theres is always a tradeoff.

bottomline do not expect .net to work with paradox 7-8-9
__________________
/ab
Reply With Quote
  #7  
Old 01-29-2003, 09:43 AM
Nerseus's Avatar
Nerseus Nerseus is offline
Danner

Preferred language:
C#
 
Join Date: Oct 2002
Location: Arizona, USA
Posts: 2,547
Default

Have you seen this set of articles from Microsoft? I saw a piece talking about datatypes in Paradox and how they map in .NET. I didn't read too far but it might be useful.

-Nerseus
__________________
"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Reply With Quote
  #8  
Old 01-30-2003, 02:10 AM
Kaliffen Kaliffen is offline
Newcomer

Preferred language:
vb.net, C#, java
 
Join Date: Jan 2003
Location: -
Posts: 5
Default coo!

thx man.

It dident solve the problem, but is the first REAL HELP i have gotten i the matter.

One the articles states that the logical field is mapped to at sql bit but this is only valid for paradox 5.x & 4.x

At least now i KNOW there is a driver problem, and doesent have to worry about my code

goodie....

/me closing subject
__________________
/ab
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BUG in Visual Studio.NET 2003, ASP.NET dev2dev ASP.NET 3 01-05-2005 09:20 AM
ASP.NET(vb) + MySQL using ODBC .NET Provider & MyODBC 3.51 kisk Database / XML / Reporting 3 06-10-2004 09:40 PM
Ado.net Odbc Giuseppe Database / XML / Reporting 3 01-16-2004 04:17 AM
ado.net through odbc to access thursday Database / XML / Reporting 4 04-10-2003 09:01 AM
Oledb.net vs ODBC.net tommyfan Database / XML / Reporting 2 01-30-2003 08:32 AM

Advertisement: