I want to change key value in registry.
I want to change dsn data source at run time. for which I have to change registry key. I know the following functions but they gave error saying ‘Type Mismatch’.
Code, which I have written
'Lresult = RegSetValueEx (HKEY_CURRENT_USER, "\ Software \ ODBC \ ODBC.INI \ BVPReg\DBQ", 0&, REG_SZ, Text1.Text, l)
Lresult = RegSetValue (HKEY_CURRENT_USER, "\ Software \ ODBC \ ODBC.INI \ BVPReg", DBQ, REZ_SZ, Text1.Text)
I am passing following arguments
In registry key is - HEY_CURRENT_USER, "\ Software \ ODBC \ ODBC.INI \ BVPReg
Key Name - DBQ
Value Type - String
Value - “c:\test.mdb”
Can any one tell me how to use these functions?