1

如何预览长字符串(SQL 查询),例如(Eclipse Juno 中 Android 开发的实际代码):

String insert_reminder = "INSERT INTO REMINDERS (NAME, DESCRIPTION, REMIND_TIMESTAMP, REMIND_TYPE_ID, STATE, STATUS_ID, IMAGE_ID, REMIND_RINGTONE) "
                        + "VALUES (\'"
                        + data.getStringExtra("remind_name")
                        + "\',\'"
                        + data.getStringExtra("remind_description")
                        + "\', "
                        + data.getLongExtra("remind_timestamp", 0)
                        + ", 1, "
                        + data.getIntExtra("remind_state", 1)
                        + ", 1,"
                        + data.getIntExtra("image_id", 1)
                        + ",\'"
                        + data.getStringExtra("remind_ringtone") + "\'" +
                        ")";

我想查看完整的字符串,即使没有数据。例如上面:

"INSERT INTO REMINDERS (NAME, DESCRIPTION, REMIND_TIMESTAMP, REMIND_TYPE_ID, STATE, STATUS_ID, IMAGE_ID, REMIND_RINGTONE) VALUES ('data.getStringExtra("remind_name")', 'data.getStringExtra("remind_description")', data.getLongExtra("remind_timestamp", 0), 1, data.getIntExtra("remind_state", 1), 1, data.getIntExtra("image_id", 1), 'data.getStringExtra("remind_ringtone")')"

我需要这个来检查 SQL 查询中的逗号。提前致谢。

4

1 回答 1

1
  • 在特定行设置断点
  • 在调试模式下启动您的应用程序并继续,直到它在断点处停止
  • 选择字符串并按 ctrl+shift+i(检查)
于 2013-01-13T15:31:33.023 回答