IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardParadox to/from Other Data Sources Topic   Print This     

Paradox to ODBC SQL Connection Login Screen

Paradox to ODBC SQL Connection Login Screen in Paradox to/from Other Data Sources topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: Paradox   Connection   Paradox ODBC   Paradox ODBC SQL   Connection Login  
Brad.M
Advanced Business Products, In
Orange City, FL USA

Does anyone know of a way to get rid of the pop up login screen when connecting BDE to ODBC SQL server? I have found places that state you can store the login information, but that does not seem to work. Is there a specific ODBC driver I should be using that will work better than the SQL Server Native Client 11 (this seems to work the best for data types and such)?

 Posted 6 years ago (Thread Starter)
Comment Quote
About Brad.M -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #15218, 4 reply
Thread Started 4/7/2015 7:15:43 AM
View Counter=5284
Last Reply Posted 5/22/2015 11:28:14 AM)
Location=Orange City, FL USA 
Joined=7 years ago   MB Posts=2  
Vicki.C
Paramus, NJ USA

Make sure there is only one entry in HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Database Engine\CONFIGFILE01.  Sometimes if you've tried to install more than once, the entry gets duplicated with a semi-colon inserted between the values.  Delete the second entry including the semi-colon.

 Posted 6 years ago
Comment Quote
About Vicki.C -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #15222 (Level 1.1)  Reply to 15218
Thread Started 4/14/2015 6:44:37 AM
Location=Paramus, NJ USA 
Joined=10 years ago   MB Posts=1   KB Comments=1  
Anonymous Post

Brad,

I have PFW programs that write thousands of SQL Server transactions every day using ODBC SQL Server.  I open the database when first starting the program and then pass the variables back and forth as required.  The following four code items are stored at the form level for my main application form.

In summary:

- I defined a custom type in the Type() event

- I defined some form level variables

- I created the method openProgramFiles() to collect parameters and open the database (This also opens my custom SQLLIB library that contains the rest of my re-usable SQL related code)

- I updated the form open() event to call openProgramFiles()

- Remember to close the database on the form's close() event.

At the form level:

Type
   varArray = dynarray[] anytype
   strarray = array[] string
endType

Var
 sqldbname, appDBname string
 rdb database
 dbparmsDA dynarray[] anytype
 customLib, sqlLib library
 outputArray vararray
endVar

method open(var eventInfo Event)

 if eventInfo.isPreFilter() then
  ;// This code executes for each object on the form:

 else
  ;// This code executes only for the form:

  if not openProgramfiles()
   then disableDefault
        errorclear()
        close()
  endif

 endif

endmethod

method openProgramFiles() logical
var
 tc tcursor
 currentSes session
 newpass string
endvar

currentSes.open()     

newpass = "XXXXX"
currentses.addPassword(newPass)

if not tc.open(":CUSTOMAPP:LOGIN.DB")
 then msgInfo("Error Starting Program",
   "Unable to open table with login data.  Call Technical Support")
   return false
endif
tc.movetorecord(1)
 
outputArray["DB User Name"] = tc."user_name"
outputArray["DB Password"] = tc."user_password"
outputArray["DB Alias Name"] = "SQLDATA"
outputArray["Application Alias Name"] = "CUSTOMAPP"
CustomLib.PassArray(outputArray)
tc.close()

appDBName = outputArray["Application Alias Name"]
sqlDBName = outputArray["DB Alias Name"]
dbParmsDA["USER MODE"] = "READ/WRITE"
dbParmsDA["USER NAME"] = outputArray["DB User Name"]
dbParmsDA["PASSWORD"] = outputArray["DB Password"]
 
;Test Opening the SQL database
try rdb.open(sqldbname, dbparmsDA)
 onfail
  msgInfo("Error Opening SQL  database",
 "Unable to open SQL database for setting up program.\nAborting procedure")
 errorshow()
  return false
endtry
rdb.close()

;Open the SQL library
if not sqllib.open(":L:SQLLIB")
 then
  msgInfo("Error Opening Library",
 "Unable to open SQLLIB library.\nAborting procedure")
 errorshow()
 rdb.close()
  return false
endif

return true

endmethod

---
Bradley Wood
 Posted 6 years ago
Comment Quote

Post ID #15220 (Level 2) and Parent is 15218
Reply Posted 4/9/2015 5:37:17 AM
Most Recent Post
abp
Altamonte Springs, Florida, USA

Bradley, I read thru your response and it appears that you're posting the the SQL db only thru the library.  I have a situation that I need to post to the SQL db from many different forms and passing all of the data thru to a library would be extensive.  Is there any other way to open the SQL db for the entire paradox session?

I'm concerned about performance if we have to open the db connection on each and every form.

Thanks for your help!

Beth

 Posted 6 years ago
Comment Quote
About abp -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15227 (Level 1.1)  Reply to 15220 and Parent is 15218
Thread Started 5/22/2015 11:27:55 AM
Location=Altamonte Springs, Florida, USA  
Joined=20 years ago   MB Posts=88  
Brad.M
Advanced Business Products, In
Orange City, FL USA

Brad, 

That worked perfectly! Thank you so much for your assistance, we really appreciate it!

 Posted 6 years ago (Thread Starter)
Comment Quote
About Brad.M -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #15221 (Level 1.2)  Reply to 15220 and Parent is 15218
Reply Posted 4/10/2015 5:47:31 AM
Location=Orange City, FL USA 
Joined=7 years ago   MB Posts=2  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P184A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #15218 Counter
5284
Since 4/7/2015
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2021 Prestwood IT Solutions.   [Security & Privacy]