Showing posts with label vb6. Show all posts
Showing posts with label vb6. Show all posts

Monday, March 26, 2012

How to save Excel spreadsheet in SQL Database

I need to understand how I can save an excel spreadsheet in the SQL 7.0 db.
Am I trying to save the XLS file or just a link to it' I have a VB6 front
end to the SQL database.
ThanksYou're probably better off saving a link to the XLS, depending on what
you're doing with it in your application. The links are easier to
store and retrieve and you don't have to deal with the overhead of
storing and retrieving large binary objects in your database.
-- Mary
MCW Technologies
http://www.mcwtech.com
On Fri, 23 Jan 2004 12:31:43 -0600, "ddg1950" <dgoncher@.clearlam.com>
wrote:
quote:

>I need to understand how I can save an excel spreadsheet in the SQL 7.0 db.
>Am I trying to save the XLS file or just a link to it' I have a VB6 fron
t
>end to the SQL database.
>Thanks
>

How to run TSQL from vb net 2003

Hi All
I am upgrading a VB6 program to VB net 2003 which uses MSDE 2000 RelA
In vb6 I called a function...
retval = ExecCmd("osql -E -i """ & path & "\sql\CreateTramcars.sql""")
which ran the TSQL script against OSQL. The script basically created the
Database in MSDE then imports a heap of tables from Access 2000.
Private Function ExecCmd(cmdline$)
'used for MSDE to launch osql
Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO
Dim ret&
' Initialize the STARTUPINFO structure:
start.cb = Len(start)
' Start the shelled application:
ret& = CreateProcessA(vbNullString, cmdline$, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, vbNullString, start, proc)
'Wait for the shelled application to finish:
ret& = WaitForSingleObject(proc.hProcess, INFINITE)
Call GetExitCodeProcess(proc.hProcess, ret&)
Call CloseHandle(proc.hThread)
Call CloseHandle(proc.hProcess)
ExecCmd = ret&
End Function
What is the preferred method of running a TSQL script from VB Net 2003 using
sqlclient class?
Regards
Steve
hi Steve,
steve wrote:
> Hi All
> I am upgrading a VB6 program to VB net 2003 which uses MSDE 2000 RelA
> In vb6 I called a function...
> retval = ExecCmd("osql -E -i """ & path & "\sql\CreateTramcars.sql""")
> which ran the TSQL script against OSQL. The script basically created
> the Database in MSDE then imports a heap of tables from Access 2000.
> Private Function ExecCmd(cmdline$)
> 'used for MSDE to launch osql
> Dim proc As PROCESS_INFORMATION
> Dim start As STARTUPINFO
> Dim ret&
> ' Initialize the STARTUPINFO structure:
> start.cb = Len(start)
> ' Start the shelled application:
> ret& = CreateProcessA(vbNullString, cmdline$, 0&, 0&, 1&, _
> NORMAL_PRIORITY_CLASS, 0&, vbNullString, start, proc)
> 'Wait for the shelled application to finish:
> ret& = WaitForSingleObject(proc.hProcess, INFINITE)
> Call GetExitCodeProcess(proc.hProcess, ret&)
> Call CloseHandle(proc.hThread)
> Call CloseHandle(proc.hProcess)
> ExecCmd = ret&
> End Function
> What is the preferred method of running a TSQL script from VB Net
> 2003 using sqlclient class?
http://www.absistemi.it/permalink=tn169.ashx
this will use the very same feature with .Net..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Friday, March 9, 2012

how to retrive the names of sql servers running in a network through an vb6 application

I want to retrive the names of sql servers running in a network through an vb6 application .

I found a API which list out the SQL server names in the network , but I am able to connect only to the main

SQL server in the network and for other instances it gives error " DBNETLIB] Connection Open () SQL server doesn?ˉt exist or access denied"

Can anyone help me?

Thanks

Goldie

hy dear

i am also woking in scenario, can you plz tell me which API you are using...

|||You can write a WMI script to read the registry. Instance names can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL/InstalledInstances key