F
Fucool
Unregistered / Unconfirmed
GUEST, unregistred user!
以下字符串,以逗号分隔;第一位标识表名,
假定第一个表有5个字段,
哪么第一个字符串对应有5条记录(逗号2到6,如下依次)
1,,xxc,78,787,78,78,78,727,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,,67,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3,677,,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4,566g,,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5,ghj,,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,bb,,78,xx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
但现有的问题是我不知道用户的表字段个数,也不知道字段类型,只有字符串是固定的
要把这样很多的字符串写入数据库中,
请大家给个思路,最好有源码???
假定第一个表有5个字段,
哪么第一个字符串对应有5条记录(逗号2到6,如下依次)
1,,xxc,78,787,78,78,78,727,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,,67,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3,677,,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4,566g,,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5,ghj,,78,787,78,78,78,77,78.3,123.5,,343,xxx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,bb,,78,xx,cccc,2.34,39.35,3.9,2.34,0.78,3.85,0.783,0.6175,0,0,0,0,0,0,,37234.7243055556,37251.7259606481,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
但现有的问题是我不知道用户的表字段个数,也不知道字段类型,只有字符串是固定的
要把这样很多的字符串写入数据库中,
请大家给个思路,最好有源码???