msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VB - SQL - Read - Write

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
Dominique



Joined: 04 Oct 2007
Posts: 9

PostPosted: Wed Aug 09, 2006 8:31 pm    Post subject: VB - SQL - Read - Write Reply with quote

Hello,

I have the following code:
=====================================================
Public Sub LoadWriteNetworkDetails(ConnectString As String)

' Write the information to the table Inv_Network_Details_Custom
' the task is done with a Stored Procedure called
sp_Inv_Network_Details_Custom_update

ConnectString = "Initial Catalog=AeXNS3;Data Source=localhost;Integrated
Security=SSPI;"
Dim altirisConn As New SqlConnection(ConnectString)

Dim ntwrkInsCMD As SqlCommand = New
SqlCommand("sp_Inv_Network_Details_Custom_update", altirisConn)
ntwrkInsCMD.CommandType = CommandType.StoredProcedure

DataStore("Asset") = New AssetDataSet(w.Current("workitem_managed_object_id)
DataStore("Asset").BeginEdit

Dim myParm1 As SqlParameter = ntwrkInsCmd.Parameters.Add("@ResourceGuid",
SqlDbType.UniqueIdentifier)
myParm1.Value = New Guid (Datastore("Asset").Current.asset_resource_guid)

Dim myParm2 As SqlParameter = ntwrkInsCmd.Parameters.Add("@c1",
SqlDbType.NVarChar)
myParm2.Value = tbFAUNumber.Text

Dim myParm3 As SqlParameter = ntwrkInsCmd.Parameters.Add("@c2",
SqlDbType.NVarChar)
myParm3.Value = tbJackId.Text

Dim myParm4 As SqlParameter = ntwrkInsCmd.Parameters.Add("@c3",
SqlDbType.NVarChar)
myParm4.Value = tbAppMgr.Text

Dim myParm5 As SqlParameter = ntwrkInsCmd.Parameters.Add("@c4",
SqlDbType.NVarChar)
myParm5.Value = tbTitle1.Text

Dim myParm6 As SqlParameter = ntwrkInsCmd.Parameters.Add("@c5",
SqlDbType.NVarChar)
myParm6.Value = tbPhoneNumber.Text

altirisConn.Open()
ntwrkInsCMD.ExecuteNonQuery()
altirisConn.Close()

End Sub


=====================================================
I would like to use the Guid of the cuurent asset to collect the information
FAU, etc... and display them. It seems I always create a new guid and does
not use the current one to collect the information.

------------
Dominique

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1325

PostPosted: Wed Aug 09, 2006 9:19 pm    Post subject: Re: VB - SQL - Read - Write Reply with quote

"Dominique" wrote in message@microsoft.com
> Hello,
>
> I have the following code:

That's not VB, that's the misnamed VB.Net which is a different language.
Look for groups with "dotnet" in the name.
Back to top
View user's profile Send private message
Dominique



Joined: 04 Oct 2007
Posts: 9

PostPosted: Thu Aug 10, 2006 2:23 pm    Post subject: Re: VB - SQL - Read - Write Reply with quote

Let me try another group

Thank you
--
Dominique


"Bob Butler" wrote:

> "Dominique" wrote in message
> @microsoft.com
> > Hello,
> >
> > I have the following code:
>
> That's not VB, that's the misnamed VB.Net which is a different language.
> Look for groups with "dotnet" in the name.
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Write/Read to/from file Hello, How can I read into/from a file by using vb ? Need sample code, please. Thanks :)

Read/write textfile across network I need to read a file from a networkdrive which is mounted as l:. The below code works if I read from c:\test.txt but returns a file not found-error if I use l:\test.txt (the file ofcourse exists on both drives). If I use (sa

HTMLDocument.Write() method in VB6 How can I use the Write() method of the HTMLDocument in VB6? Could someone please respond with a brief sample code after testing it on their VB6? I tried the following and get the following error: Function or interface marked as restricted, or the functio

Looking For VB 6 Programmer to write a simple TAPI Program I'm looking for a VB 6 Programmer to write a TAPI compliant program to do the following. GENERAL DESCRIPTION: 1.. Open a ASCII File 2.. Read the phone number and a extension to be dialed 3.. Dial the number do a hook flash and transfer call to a in-house

How to get VB 5 to read Web pages? Hi, I want to make VB5 reading a Web page with a certain URL, and to read the text on that page into string variables. Is that possible, and what control/ commands do I need? Thanks, Olaf
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group