Home > database >  PB login interface database connection problem
PB login interface database connection problem

Time:09-28

With ASA created database
The code is as follows:
String is_userid is_password, is_database
Is_userid=trim (userid)
Is_password=trim (password)
If is_password="" then
The return - 1
End the if
The SQLCA. DBMS="ODBM"
The SQLCA. The AutoCommit=false
Is_database DSN=XSCJ "=" ConnectString='
SQLCA. Dbparm=is_database + is_userid "UID=" + + "; The PWD="+ is_password +" '"
Connect using the SQLCA;
Return the sqlca. SQLCode

User data sources are XSCJ
The runtime emerged: the connection fails SQLSTATE=IM002
[Microsoft] [ODBC driver manager] did not find the data source name and did not specify a default driver

CodePudding user response:

A, you can even in PB database sketchpad? Do you have an ODBC manager or the registry to see 'user data sources are
'Second, drive in the right position,
The HKEY_CURRENT_USER \ Software \ ODBC \ ODBC.ini \ XSCJ
The Driver under the values of the corresponding Driver address is correct?

Is this two reasons ~ ~

CodePudding user response:

The building Lord will SQLCA. DBMS="ODBM"

Instead of
The SQLCA. DBMS="ODBC"

Have a try

CodePudding user response:

In the PB database in the drawing board to use the data source configuration a Profile after the connection is successful, then copy in the Profile attribute of the Preview TAB connection configuration code is used to test program,

CodePudding user response:

refer to the second floor newease response:
will host the SQLCA. DBMS="ODBM
"
Instead of
The SQLCA. DBMS="ODBC"

Try


The original DBMS write wrong

CodePudding user response:

The DBMS correct the wrong still not
Pb8 said the first, one, you can even in PB database sketchpad? Do you have an ODBC manager or the registry to see users' data source ', I have no problem
Article 2 don't understand what means can't find

CodePudding user response:

User data sources are XSCJ
You try put XSCJ system DSN

CodePudding user response:

Please master to help me

CodePudding user response:

Found no XSCJ to new?

CodePudding user response:

refer to the eighth floor jia3732 response:
found no XSCJ to new?

Well, in the system DSN build, testing success

CodePudding user response:

references 9 f zb63668331 response:
refer to the eighth floor jia3732 response:
Found no XSCJ to new?

Well, was built in the system DSN, test can be successfully

Operation is still not

Under the HKEY_CURRENT_USER \ Software \ ODBC \ ODBC.ini no XSCJ

CodePudding user response:

references to the tenth floor jia3732 response:
references 9 f zb63668331 response:
Refer to the eighth floor jia3732 response:
Found no XSCJ to new?

Well, in the system DSN build, test can be successfully

Operation is still not

Under the HKEY_CURRENT_USER \ Software \ ODBC \ ODBC.ini no XSCJ

See if your operating system user to administrator rights

CodePudding user response:

jf

CodePudding user response:

"Pb8 said the first, one, you can even in PB database sketchpad? Do you have an ODBC manager or the registry to see users' data source ', I have no problem "
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Now that can be connected, in the "Preview" in the drawing board connection code copy down, with hard code way to stick to your program in the first, and see if I can connect, can even again into a parameter form,
  • Related