Author Topic: Primavera SDK Doesn't Work with 64-bit Vista  (Read 2398 times)

0 Members and 1 Guest are viewing this topic.

Swift

  • Swamp Rat
  • Posts: 596
Primavera SDK Doesn't Work with 64-bit Vista
« on: April 23, 2010, 02:57:50 PM »
No question here just some random information someone may find useful later.

After wasting the afternoon away, I have found the ODBC driver for Primavera doesn't work properly with 64-bit Windows. I have also found several posts around the web with the same conclusions but found nothing public from Oracle. So I made my own under UserDSN for SQLServer and pointed it at the proper database.

So using SQL Server Management Studio to navigate the tables and fields I can query the data

Code: [Select]
using System;
using System.Data.Odbc;

namespace ODBC_1
{
class Program
{
public static void Main(string[] args)
{

OdbcConnection DbConn = new OdbcConnection("DSN=PrimTest");
DbConn.Open();

OdbcCommand DbCom = DbConn.CreateCommand();

DbCom.CommandText ="SELECT rsrc_id FROM dbo.RSRC WHERE rsrc_name = 'Mobilization'";
OdbcDataReader DbReader = DbCom.ExecuteReader();

int iReturn = DbReader.FieldCount;

for ( int i = 0; i < iReturn; i ++ )
{
        String fieldName = DbReader.GetName(i);
        Console.Write( fieldName );
}
Console.WriteLine();

while( DbReader.Read())
{
            for (int i = 0; i < iReturn; i++)
          {
                  String col = DbReader.GetString(i);
                        Console.Write(col);
          }
          Console.WriteLine();
  }
DbReader.Close();
DbCom.Dispose();
DbConn.Close();


Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}


Now I just have to work up the nerve to start manipulating data...