connect to mysql database with wps

时间:2016-02-12 21:44:24

标签: sas

I am working with the statistician at my company and trying to connect to a mysql database from WPS (world programming system). The WPS docs are pretty terrible.

i tried this sas/access approach:

func clearCache() {
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
let fetchRequest = NSFetchRequest()
fetchRequest.entity = NSEntityDescription.entityForName("CacheItems", inManagedObjectContext: managedObjectContext)
fetchRequest.includesPropertyValues = false

do {
    let results = try managedObjectContext.executeFetchRequest(fetchRequest) as! [NSManagedObject]
    for result in results {
        managedObjectContext.deleteObject(result)
    }

} catch {
    let nserror = error as NSError
    NSLog("CoreData erasing error - \(nserror), \(nserror.userInfo)")
}

// checking Cache items count
do {
    let fetchRequest = NSFetchRequest(entityName: "CacheItems")
    myCacheItems = try managedObjectContext.executeFetchRequest(fetchRequest) as! [CacheItemsClass]
} catch let error as NSError {
    print("\(error.localizedDescription)")
} }

however, i got the error:

could not load module MYSQL or one of it's dependencies. etc. etc.

Is there something specific configuration wise that you have to do to use MYSQL with WPS?

1 个答案:

答案 0 :(得分:0)

对于任何试图解决此问题的人来说,这是我在Linux中的解决方案以及我是如何找到它的。

mysql引擎是以下模块:“libwpsemsql.so”要查看缺少的内容,可以键入:

  • ldd /yourfolder/wpl/wps-3.3/bin/libwpsemsql.so

您会注意到未解决的链接条目。如下定义LD_LIBRARY_PATH并将其放在您的配置文件或/etc/profile.d/wps.sh中作为示例。

  • export LD_LIBRARY_PATH = / yourfolder / wpl / wps-3.3 / bin

接下来你会看到缺少所以实际上是libmysql.so.16。我不知道他们从最初选择了什么,但是我找到了https://github.com/janzhou/js-c的工作副本,其工作方式是输入以下内容:

那应该是它!这也是挖掘任何缺失依赖性的有用技术。在Windows中,您可以查看您的wps安装文件夹,并在第174页上找到标题为“连接到MySQL数据库”的WPS Workbench用户指南,它引用了如何下载Connector / C并在Windows中安装。我在Linux中尝试了相同的技术,但它导致了libmysqlclient.so.18.6,当我尝试使用它时,wps段出现故障。