Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unicode to ASCII SqlServer 2005
Message
From
29/10/2008 11:59:32
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01358093
Message ID:
01358099
Views:
16
Do you have access to SMSS?

If you do, just rioght-click on the DB. Select Tasks, Generate scripts.

The script wizard will let you create 1 script/SP just like you are trying to do.

>I am writing a program to extract all custom [dbo] stored procedures and store them in local text files.
>
>Local cstr, svr, spName
>Clear
>Close Tables All
>cstr = "Driver={SQL Native client};Server=(local);Database=AWS2W;Trusted_Connection=Yes"
>svr = Sqlstringconnect(cstr)
>If svr > 0
>	If Not Directory("StoredProcedures")
>		Md "StoredProcedures"
>	Endif
>	= SQLExec(svr,"sp_Stored_Procedures null,'dbo'","sp")
>	If Reccount('sp') > 0
>		Index On Procedure_name Tag pn Desc
>		Locate
>		Scan
>			spName = Left(Procedure_name,At(";",Procedure_name)-1)
>			TEXT TO Cmd TEXTMERGE NOSHOW PRETEXT 15
>			SELECT RTRIM(text) ttext FROM syscomments where text like
>			'%<<ALLTRIM(spName)>>%' and texttype = 2
>			ENDTEXT
>			If SQLExec(svr,Cmd, "spText") > -1
>				= Strtofile(ALLTRIM(STRCONV(tText,10)),"StoredProcedures\"+Forceext(spName,"sql"))
>			Endif
>		Endscan
>	Endif
>Endif
>SQLDisconnect(0)
>
>
>My problem is for large SP when the size exceeds 1985 characters only a partial translation occurs. In other words it seems that onlky the first 1985 (ASCII) characters are converted, the rest appear unconverted.
>
>Any ideas?
>
>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform